Answered by:
Play youtube videos in apps

Question
-
I am trying to play this video in my app:
http://www.youtube.com/watch?v=mTzEp4CeWT8
I added this code:
<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/mTzEp4CeWT8" allowfullscreen frameborder="0"></iframe>But it says it won't work...
I don't understand the message because the Video plays on Mobile devices such as Windows Phone 8 (both in their new app and on the mobile web site).
How do they do it?Do they have access to a different type of Video player that plays RSTP format or something instead of the <video> tag we have to use?
Do XAML apps have a solution and I should move my app over to that language?
Thanks
Tuesday, May 28, 2013 12:33 AM
Answers
-
yes Cobra, sorry. it was a mistake.
Could you please upload your small sample source at skydrive or somewhere else. so that we could better suggest you.
Meanwhile, you could try this.
add thehtml5=1
in the src attribute of the iframe :<iframe src="http://www.youtube.com/embed/dP15zlyra3c?html5=1"></iframe>
You may use your src but with html5=1 attribute.Note: Windows phone 8 is not 100% compliance to window 8 devices so it is not guaranteed
that everything 'll work on window phone 8 devices.
The video will be displayed as HTML5 if available, or fallback into flash player.
Vote As Helpful, Propose As Answer, or Mark As Answer
MCSD | MCP
- Edited by Mehmood Ahmed Wednesday, May 29, 2013 1:24 AM
- Proposed as answer by strange communication Friday, May 31, 2013 11:25 PM
- Marked as answer by Yanping WangModerator Tuesday, June 4, 2013 3:18 AM
Wednesday, May 29, 2013 12:48 AM
All replies
-
Can you change this :
<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/mTzEp4CeWT8" allowfullscreen frameborder="0"></iframe>
To this :
<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/mTzEp4CeWT8?feature=player_detailpage" allowfullscreen frameborder="0"></iframe>
- GirijaTuesday, May 28, 2013 3:12 AM -
Girija - did you try that?
It didn't work for me. Hit play - it says it can't play in HTML 5.Tuesday, May 28, 2013 5:22 AM -
I did not try that.. but I tried this video and it works :
<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/c5H7FY_DSWo? feature=player_detailpage" allowfullscreen frameborder="0"> </iframe>
I am not sure but must be issue with the video (that you are trying) then.
- Girija
- Proposed as answer by strange communication Friday, May 31, 2013 11:25 PM
Tuesday, May 28, 2013 7:10 PM -
WebView is Xaml control - does this approach only work for XAML?Wednesday, May 29, 2013 12:10 AM
-
yes Cobra, sorry. it was a mistake.
Could you please upload your small sample source at skydrive or somewhere else. so that we could better suggest you.
Meanwhile, you could try this.
add thehtml5=1
in the src attribute of the iframe :<iframe src="http://www.youtube.com/embed/dP15zlyra3c?html5=1"></iframe>
You may use your src but with html5=1 attribute.Note: Windows phone 8 is not 100% compliance to window 8 devices so it is not guaranteed
that everything 'll work on window phone 8 devices.
The video will be displayed as HTML5 if available, or fallback into flash player.
Vote As Helpful, Propose As Answer, or Mark As Answer
MCSD | MCP
- Edited by Mehmood Ahmed Wednesday, May 29, 2013 1:24 AM
- Proposed as answer by strange communication Friday, May 31, 2013 11:25 PM
- Marked as answer by Yanping WangModerator Tuesday, June 4, 2013 3:18 AM
Wednesday, May 29, 2013 12:48 AM