How to implement YouTube video iframe...

Hello there,
Maybe this topic is like others in this forum, but... i will give you my point, answer and question...
Well... example:
1. In our empty application project lets put in default.html:
<iframe width="500" height="412" src="https://www.youtube.com/embed/tDBSa5TMX2Y?html5=1" frameborder="0" allowfullscreen></iframe>
2. In package.appmanifest lets add in Content URIs this lines:
https://*.youtube.com
(https://*.soundcloud.com  - if you use soundcloud iframe)
welll. If you make this- try- you will find that youtube video was loaded in html5 (or soundcloud).
The problem is only in youtube video- when i click play- nothings happened. Is there something else? Why cant play Youtube video? If i try with soundcloud- everything is ok and works perfect.
Can you give me some ideas how to youtube play?
(sorry for my english)

Lets give a summary - what you will do to put youtube clip in your app (windows 8.1):
First way is with webview controller- just put in code:
<x-ms-webview src="https://www.youtube.com/embed/tDBSa5TMX2Y?html5=1"></x-ms-webview>
Second way is with iframe... when content come from ajax or some api. To do this, your youtube embed code must contain param html5=1. Steps are:
1. In package app manifest (package.appxmanifest) you must add Content URIs like :
https://*.youtube.com and include it. If you use SoundCloud iframe- add another line with
https://*.soundcloud.com
2. Just add line with iframe :
<iframe width="500" height="412" src="https://www.youtube.com/embed/tDBSa5TMX2Y?html5=1" frameborder="0" allowfullscreen></iframe>
And thats it. If content comes from ajax (API)- you must "escape" it ... something like this:
MSApp.execUnsafeLocalFunction(function () {
element.html('<iframe src="youtube"... etc');
That it is.
I have some issue with my old apps - youtube iframe and elements comes but after click play - nothings happened. In this case- just create new blank app and try it. Video will play :)
Sorry for my english and good luck!

Similar Messages

  • How to make youtube video gallery auto play (&autoplay=1) work properly?

    Does anybody know how to make youtube videos play when clicked on the thumbnails in the video gallery? I have added the auto play function in the iframe code
    (<iframe width="600" height="335" src="http://www.youtube.com/embed/lwnhB8PEuDY? rel=0&autohide=1&showinfo=0&autoplay=1&theme=dark&color=white&modestbranding=1" frameborder="0" allowfullscreen></iframe>)
    for both videos but both videos play at the same time. The videos stop playing at the same time when once clicked on one of the thumbnails.
    Here is html test file and Muse project file to see what I mean.
    Help would be much appriaciated.
    Silvis.

    Hi Vinayak,
    Thank you for you response.
    Here silvis.co.uk/muse_test.zip is a valid link.

  • How to download youtube videos on Macbook Pro

    how to download youtube videos on Macbook Pro?

    If I told you how, I'd also have to get rid of this thread.  We can't discuss how to circumvent copyright restrictions, and many Youtube videos have just that.

  • How to download youtube videos to ipad without using a computer.

    How to download youtube videos to ipad without using a computer???  Looking to download some videos people created using Dr. Jean music.  My kid used Dr. Jean in preschool and wanted to keep singing them at home.
    Looking for a friend that doesn't use a computer.  I myself have downloaded some kids educational stuff and added to itunes and then put on ipod/ipad using firefox. 
    Is there an easy way, so they don't go to the photo roll??
    thanks in advance.

    There are some Apps you can use, but be careful they will only download these videos inside the App, so you won't ba able to play them in your video app or share them.
    Most popular is the app called "Video Download" but there are a lot of alternatives for free and even with more quality which you can pay for.

  • How to register youtube videos on mac hard drive?

    how to register youtube videos on mac hard drive?
    iMac 21.5 po, mid 2010 .Processor Intel i3

    You cannot. Doing so would violate YouTube's Terms of Use.
    Best of luck.

  • How to play YouTube videos in HD on iPhone over cellular?

    Does anyone know how to play YouTube videos using the Google YouTube app in HD on the iPhone over cellular? I'm asking because I have an iPhone 5 with a large LTE data plan, which I don't mind using a bit more data for better clearity on the videos. I know in the past people have suggested to use YouTube in the Safari broswer to view videos in HD, but I find it to be non-consistant. Anyone have a better idea how to watch YouTube videos in HD on iPhone/iPad over cellular (3G/LTE)?

    Did you use iAD to create the widget?   If  you did...  then there support  group  should have answers.
    If you used one of the widgets in iBA  - as you have  had no suggestion for a fix... you will need to contact iBooks support.
    The  More Like This column on the right shows links to similar problems.
    It would  seem to be  related to  your  use of  You Tube and Vimeo content or maybe its how you  put the  widget content  together.
    Have  you search the iBA help files, previous posts and the iBA  tips?

  • I'm using iPad 4 with iOS. How to play YouTube video in background?

    Any suggestion?

    Welcome to the Support Communities. This article may help:
    How to Play YouTube Videos in the Background on iOS
    ...Found by doing THIS.
    And this is just a tip: You can edit your post within 15 minutes. To edit your initial post of a thread, click on the Edit post link in the Actions section at upper right. To edit your subsequent posts of a thread, click on the Edit link at the bottom of the particular post you want to edit. Either way, when done editing, click the blue Update button.

  • How to download youtube video in Mp4 format from safari ?

    Does anybody knows how to put link and when video plays just click on it and it will download. I had that option a while ago and cant find the way to make it again. Or if you know any other way....

    Using Safari 5.0.1 and Snow Leopard I used part of what I found online and stumbled across the final solution indicated by brackets {}
    From <http://mac-dvd.com/mac-guide/how-to-download-youtube-video-on-mac-for-free.htm l>
    Step 1: Download the videos
    1. Find your favorite YouTube video. This step is pretty self explanatory. Be sure to use Safari and search for your favorite YouTube Video. {Select 720 p or greater.}
    2. Next, you need to go to 'Window' and down to Activity. Click on 'Activity' to bring up the next dialog box.
    3. Once the dialog box has popped up you need to look for the YouTube page among all the page titles and files listed in the window.
    4. Once you locate it and expand all the activities going on in the page, look for the largest file size (this is shown in the right hand side). Most of the files found in a YouTube page are small files while most FLV files are several megabytes.
    Once you locate the largest file,
    What I found out:
    {Hold down the SHIFT OPTION key and double click on it. The video should start downloading in your download and be named videoplayback.mp4.}
    What I found out in the videos I tested is that if you did not use 720p or higher, SHIFT OPTION double clicking or just double clicking on the large file in the activity window downloaded an FLV file, which you then have to convert to mp4.
    Hope this helps.
    Message was edited by: James Mol

  • How to download Youtube videos on Safari 6.0.5?

    I got a Macbook Air (Mid 2013) with OS X (10.8.4). I'm using Safar 6.0.5
    Can somebody please tell me how to download youtube videos using this web browser?
    Thanks!

    Clip Grab is not functioning well. Some of the downloads come to halt abruptly in between. Some others dont download completely, though Clipgrab shows they are 'completely downloaded'
    Anyother solution?

  • How to play youtube videos on MacBook Pro

    how do I get youtube videos to play.

    What exactly happens (or not) when you try?
    This may possibly provide an answer:
    http://www.google.com/support/youtube/bin/answer.py?&answer=1209379
    Message was edited by: Klaus1

  • How to stream YouTube video in PDF document using ID 5.5?

    I'm using ID 5.5 and know how to insert a video into a document using the Media palette, "Insert video from URL" option. However, I need to stream a YouTube video in an interactive PDF document, and when I try to insert the link from YouTube into the "Insert Video from URL" box, ID doesn't recognize it. I assume this is because YouTube video links don't end with a typical video format file-name ending, such as ".mp4" or ".mov"
    Has anyone been able to stream a YouTube video into a document using ID 5.5? If so, how did you do it?
    Downloading the video and inserting it as a regular video file isn't an option because we need to keep the PDF file size down.
    Thanks much for any advice you may have!

    It can't be done. A YouTube video cannot be streamed in any digital publishing media—PDF, EPUB, or DPS.
    There are applications which claim to be able to convert a YouTube video into a real digital publishing format like H264-encoded MP4 (preferred), but you'll have to investigate those on your own.

  • How to view youtube videos from iphone 4 to tv using composite AV cable

    Hi,
    Can any one please help me as to how to view youtube online videos on TV through my iphone 4. I tried connecting the iphone 4 and TV with a composite AV cable however I can hear only the audio but am not able to view the videos.

    It seems so stupid that you cant sort videos by date. Some please tell is that we are idiots and tell us how? And if u simply cant, well a big shout out goes to google for being right on top of things. I hate google! Company is too big and they cant keep up apparently. Sooo much junk on you tube and they cant give us filter and sort options on the most widely used tablet on the market.? Gawd pleeeeze tell me im an idiot!

  • How to play youtube videos on apple tv

    How do you play youtube videos and stuff from the interent thru Apple TV????  Oh, and how about a Dvd presentation??

    There is a Youtube app on the Apple TV.
    Other internet content would need to be through Airplay (IOS device) or mirroring (recent IOS devices or Macs)
    DVD's are tricky, natively they are blocked (through mirroring) but users have reported success with VLC

  • How To Embed YouTube Videos in InDesign

    First time poster, be gentle!
    Anyways, I'm designing an internal newsletter for my company, and one of the feature stores includes talks about one of our clients' videos on YouTube, and I would like to embed that video into my InDesign file.
    I followed the instructions at http://help.adobe.com/en_US/InDesign/6.0/WSC117AD88-69F6-4658-A1F1-12012B15B9D7.htm, and everything seems to be OK until I click the "Verify URL and Movie Size" button. It gives me the error "URL does not refernce a movie type." I am assuming this is because it's a YouTube video and there are problems reading it, but is there any way around this?
    Thanks for your help!

    Just wondering if anyone has found a way to embed streaming media content such as youtube, vimeo, or other video provider movies into Indesign? I also need to be able to place streaming audio from an http source.
    I want to export my indesign files to flash to create interactivity but really have no idea how to use Flash.
    I am not even sure Flash can embed streaming media content from you Youtube or streaming audio content.
    I looked into using PDF (via the Youtubewidget and it works great) but the issue I have there is that it's page transitions are very weak visually compared to that of Flash's page turn effect. I found a source for some code which looks Ok but does not compare to Flash. Here is the site link. http://www.coastworx.com/bookflip.php
    Is there a way to export from a PDF to Flash and have all the media & links stay intact?
    On another note, I did some testing in Indesign CS5. If you try and place a video from a URL it will require that the video start with HTTP or RTMP (for flash media server). I tried using the standard object embed codes from Youtube but it informs you that it is not properly formatted. I even tried to truncate it to start with the HTTP section of the code but it provided me with an error, stating it must start with HTTP or RTMP.
    Does anyone know how to accomplish what I am looking to do?
    Thanks in advance...
    Robert
    Message was edited by: mycreativemind

  • How to download youtube video + Mac OS 10.6.7 + Firefox 4.0

    Can someone please tell me how to download a youtube video to my computer in a format that can be burned on a DVD. I am on a Mac OS 10.6.7 and Firefox version is 4.0.1
    Thanks.

    The short answer is that youtube videos aren't meant to be downloaded, and are usually the intellectual property of the poster. I would suggest sending a message via youtube to the video poster and requesting a copy of the video file. Explain to the poster what you intend to do with the video and why.
    If they are willing to send you a copy of the video file, then from there you would want to use DVD creator software if you want to make it a playable DVD. You may be able to find a free DVD creation program from Cnet's download.com

Maybe you are looking for