0

I have a webbrowsercontrol and I want to play videos from youtube and vimeo. At first I couldn't even load youtube.com and it was saying that I had to eneble javascript, so I did and I added this IsScriptEnabled="True" property in <phone:WebBrowser/> and then the page loaded, But when I press on a video to play it says "video not available" on youtube, and "your phone can't play this video" on dailymotion.

I used this code:

VideoStream.Navigate(new Uri("http://www.dailymotion.com/", UriKind.Absolute));
user2975038
  • 537
  • 7
  • 23

2 Answers2

1

I'm not sure about the exact problem but i think it's flash related. I had the same problem when I used WebBrowser.

If noone else has a better solution you could at least use this solution for youtube videos:

a video link ends like this: watch?v=XXXXX

just add &html5=1 to enforce html5 video playback. --> watch?v=XXXXX&html5=1

If you want to only show the video: --> https://www.youtube.com/embed/XXXX?&autoplay=1&rel=0&html5=1

user2974830
  • 428
  • 1
  • 4
  • 13
  • Thank you very much :D It works perfectly for youtube! But It still has some problems with Vimeo, and 90% of the videos I want to add are from Vimeo XD. for Vimeo I did https://www.dailymotion.com/embed/video/XXXXXXX?&autoplay=1&rel=0&html5=1 But the weird thing is that it says again that it can't play it, but then if I click play one more time the video loads, but then when I press the back button it says resuming but necer actually passes that stage. (I'm testing this on windows phone 8 emulator) – user2975038 Jan 25 '15 at 03:34
  • Dailymotion not Vimeo XD. I don't know how I made this mistake. – user2975038 Jan 25 '15 at 04:17
  • Hey @user2975038, I know. This workaround is only supported by youtube. daylimotion for example doesn't support those parameters. I searched if there's a way to force daylimotion to force html5 video playback but i couldn't find a solution :( – user2974830 Jan 25 '15 at 11:04
  • so am I doomed? XD do you have any other ideas for a workaround? – user2975038 Jan 25 '15 at 19:45
0

As far as I know, if the Internet explorer in your machine can play the flash video, then the “WebBrowser” control in .Net framework can also do this, so please make sure the IE in your machine works fine with the flash ActiveX control.

Dom Adams
  • 281
  • 2
  • 11