Forum

m_tex.play_video() undefined?

29 February 2016 08:33 #7846
Hi!

First of all, I'd like to thank you for the great work. Blend4web helps our project a lot. Hope you could keep up with the good work!

Recently, our project needs to deploy video and audio, so I have a look at this great post https://www.blend4web.com/en/article/95/

But when I tried to print the m_tex.play_video("myTexture") method to see whether it works, the console gives me a undefined warning. I put the method in load_cb() method.

I am not sure what is wrong here?

Also, I notice that blend4web separates audio and video, and I need to use the sfx module to play the audio. However, I am confused on how to play the audio of a video I want to play? Should I convert the video into an audio file first, and then play the audio and video together? Or if there is a better way?

Thank you so much!
29 February 2016 10:07 #7854
Hello and welcome to the forum.

But when I tried to print the m_tex.play_video("myTexture") method to see whether it works, the console gives me a undefined warning. I put the method in load_cb() method.

It's ok. This method doesn't return anything and, when you try to print that, it prints "undefined".

Should I convert the video into an audio file first, and then play the audio and video together? Or if there is a better way?

Yes, you should. This way is used in this lesson.
Blend4Web developer
 
Please register or log in to leave a reply.