Languages

Menu
Sites
Language
Play youtube video in html5 in jquery mobile app

Hello guys,

I am writing a web app in tizen using jquery and jquery mobile. i am tryng to play a youtube video in my web app using html. it is working fine with iframe tag in web browser, but when i am installing it on my device or etizen emulator, it is calling youtube to play that video insted playing it within the app, any body can tell me what is the right way to do it in tizen web app.

Thankyou.

Responses

7 Replies
talari praveen kumar

Hi

Try this 

<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/yeF_b8EQcK0?html5=1" frameborder="0"> </iframe>

 

arvind sharma

Thanx parveen , but it not playing video in the jquery mobile page, it is calling browser to open the youtube .

talari praveen kumar

Hi Arvind

For me the above code is not opening browser. It is playing youtube video in web app itself. please see the below screenshot

http://www.4shared.com/photo/BliZJhd8/youtube.html?

arvind sharma

Hello praveen kumar Can you provide me the demo or code of full page, because i am not able to do it.

talari praveen kumar

Hi Arvind 

In tizen IDE go to file->new->Tizen web project ->template ->jQuery mobile/tizen webUI frame work. Then place the below code in place of <div  data-role="content">

 <div data-role="content" >
        <iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/yeF_b8EQcK0?html5=1" frameborder="0"> </iframe>

</div><!-- /content -->

Note: Add  <access origin="*" subdomains="true"/> in config.xml file.

arvind sharma

Thankyou parveen kumar. Now it worked. i am not using <access origin="*" subdomains="true"/>.

arvind sharma

hello talari praveen i got stuck in new problem, when i am using width="auto" height="385" or width="auto" height="auto"  to fit the player in the tizen emulator then only audio is working and video is not working, it is showing black screen and audio is playing in the backgroud. can you help me to figure out this.

Thankyou.