m_tex.play_video() undefined?
29 February 2016 08:33
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!
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
Hello and welcome to the forum.
It's ok. This method doesn't return anything and, when you try to print that, it prints "undefined".
Yes, you should. This way is used in this lesson.
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.