Discussion Forums  >  Audio, Video, Playing, Recording

Replies: 27    Views: 246

kingstonsymphony
I hate code!
Profile
Posts: 47
Reg: Jun 29, 2012
Kingston
1,820
07/11/12 07:06 AM (13 years ago)

Youtube, HTML5 and the Wheel of Death

Hi Everyone, I've been creating custom html5 pages, and was wondering how I could go about embedding Youtube videos within those pages? I've seen examples using cutom url, but I don't want the video as a separate screen, I want it to be part of a large desciption of everything else. In addition, when I do embed these videos, I end up with the Android spinning wheel of death, as it has been called. I'm using Buzztouch 2.0, so I though the spinning wheel fix was already included in html5 pages plugins. Thanks, Dan
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
07/11/12 07:15 AM (13 years ago)
Are you self-hosted? Fred
 
kingstonsymphony
I hate code!
Profile
Posts: 47
Reg: Jun 29, 2012
Kingston
1,820
like
07/11/12 07:16 AM (13 years ago)
Nope, using Buzztouch to host.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
07/11/12 07:26 AM (13 years ago)
When did you create your app? When did you last download the source code? Fred
 
kingstonsymphony
I hate code!
Profile
Posts: 47
Reg: Jun 29, 2012
Kingston
1,820
like
07/11/12 07:27 AM (13 years ago)
Created the app about a week and a half ago. Downloaded the source code within that time period.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
07/11/12 07:31 AM (13 years ago)
Have you tried implementing the Wheel of Death solution? Fred
 
Ag-Chieve
Lost but trying
Profile
Posts: 124
Reg: Apr 16, 2012
Winnipeg
9,090
like
07/11/12 07:47 AM (13 years ago)
This is just a semi-educated guess here but maybe it has something to do with the size of the video. The smallest embed code I could see when I clicked on a random video on Youtube is 420 x 315. Considering that a Galaxy S 2 screen is only 800 x 480 (according to Wikipedia) that video is going to take up a lot of the screen. If it is embedded in a page with a bunch of other content that it has to compete for space with, that might be causing the problem. You could try doing a custom embed size (which you can do on Youtube) and make it tiny and see if that will work. (This means that it will be equally tiny on larger devices, though.) You could also try things like making the size of the video percentages instead of actual pixel dimensions. This will allow it to resize itself according to how much screen space is available. Again, these are just guesses but I've learned recently that when working with videos, the size of the video always has to be taken into consideration.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
07/11/12 08:03 AM (13 years ago)
I'm not sure what the source of the problem is, but I don't think it has to do with video size. Perhaps it it's just about size. But here's a interesting clue. Two sites different outcomes: http://www.idofnashville.com/#upcoming This site has Wheel of Death problem. http://www.meetup.com/nashvillejug/ This site has no Wheel of Death problem. If you figure out what's different about the two sites we'll know the source of the problem. Fred
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
07/11/12 08:03 AM (13 years ago)
Haven't tried this, but it should work... Find the video you want on youtube. I'll use this one as it's on the front page: http://www.youtube.com/watch?v=_tMBLFIW3Rs&feature=g-logo-xit change to: http://m.youtube.com/watch?v=_tMBLFIW3Rs&feature=g-logo-xit right click the 'watch video' link and copy the link location, in this case: rtsp://v5.cache3.c.youtube.com/CjYLENy73wIaLQkb3RZSLAHT_hMYDSANFEIJbXYtZ29vZ2xlSARSBXdhdGNoYOuD79uTwtf-Tww=/0/0/0/video.3gp You now have the direct streaming url of the video. html5 video embed tags? <video>rtsp://v5.cache3.c.youtube.com/CjYLENy73wIaLQkb3RZSLAHT_hMYDSANFEIJbXYtZ29vZ2xlSARSBXdhdGNoYOuD79uTwtf-Tww=/0/0/0/video.3gp</video> Maybe some html5 tweaks needed (js library?) but it SHould work... An added benefit is weeding out the videos that aren't mobile compatible - there will be no 'watch video' link at the m.youtube.com url. **Edit** When I say I haven't tried it, I have tried it with a customURL and it works fine - just haven't tried embedding into html5
 
kingstonsymphony
I hate code!
Profile
Posts: 47
Reg: Jun 29, 2012
Kingston
1,820
like
07/11/12 08:05 AM (13 years ago)
The wheel of death problem is fixed, but videos still aren't playing. I have a link within the app to the youtube videos (instead of having them embedded to play on the screen with other content), but they are still not playing. They go to play, but won't buffer or load after play is pushed. I'm testing it on a tablet, and I regularly run hq videos from the youtube app, without any trouble. Any suggestions?
 
Ag-Chieve
Lost but trying
Profile
Posts: 124
Reg: Apr 16, 2012
Winnipeg
9,090
like
07/11/12 08:07 AM (13 years ago)
I have to show the launch in native browser button to get my Vimeo videos to play. They won't play within the app. Try using the launch in native browser button and see if that works. It's a bit of a clumsy workaround but it might work.
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
07/11/12 08:07 AM (13 years ago)
Not all yt videos are mobile compatible, have you checked?
 
kingstonsymphony
I hate code!
Profile
Posts: 47
Reg: Jun 29, 2012
Kingston
1,820
like
07/11/12 08:17 AM (13 years ago)
Ag-chieve, would that mean setting up a cutom url page, or can I launch from native app within an HTML 5 page? Ideally, I would be ok with the app leaving the actual app itself to launch a video, but I'm not sure how to launch a webpage link that leaves the actual app itself.
 
kingstonsymphony
I hate code!
Profile
Posts: 47
Reg: Jun 29, 2012
Kingston
1,820
like
07/11/12 08:23 AM (13 years ago)
raveyd, I tried your method, but it won't work with html5 as the tablet won't recognize the rts code address
 
Ag-Chieve
Lost but trying
Profile
Posts: 124
Reg: Apr 16, 2012
Winnipeg
9,090
like
07/11/12 08:25 AM (13 years ago)
All my videos are done with custom url plugins. There is a link function on the custom html page. Ostensibly, you should be able to make it link to whatever you need it to. If you were to host your video somewhere like Youtube or Vimeo and make the link point to that, that should work (I think).
 
kingstonsymphony
I hate code!
Profile
Posts: 47
Reg: Jun 29, 2012
Kingston
1,820
like
07/11/12 08:53 AM (13 years ago)
hey Ag Chieve, tried that as well (attempted to make it both a pop-up window and a new window, and in both cases, it did not play the video. hmmmmm
 
Ag-Chieve
Lost but trying
Profile
Posts: 124
Reg: Apr 16, 2012
Winnipeg
9,090
like
07/11/12 08:58 AM (13 years ago)
Do you have the launch in native browser button enabled?
 
kingstonsymphony
I hate code!
Profile
Posts: 47
Reg: Jun 29, 2012
Kingston
1,820
like
07/11/12 09:11 AM (13 years ago)
In my html5 page, I've used the link adder to try to link to the video. The only enabler I find below is in behaviour, which allows me to show a "launch native application button", but this does not affect the behaviour of the link itself. I'm really confused now, as the video link still pops up, but won't play. I also then tried to embed the video using the <iframe> code that YOutube provides. it embedded the video, and a black screen now is in my tablet. The audio will play for the video, but the the actual video. It does not have a play button, but if I tap the area where the screen should be, the audio plays. A solution to either would be awesome. :S
 
Ag-Chieve
Lost but trying
Profile
Posts: 124
Reg: Apr 16, 2012
Winnipeg
9,090
like
07/11/12 09:40 AM (13 years ago)
I'm going to confuse things even further now. I tested putting an embed code into a custom html page and it not only showed up but it played with no problem. So, maybe the problem is with the device. Is there another device you can test on? I'm using a Samsung Galaxy S2 for testing.
 
kingstonsymphony
I hate code!
Profile
Posts: 47
Reg: Jun 29, 2012
Kingston
1,820
like
07/11/12 09:50 AM (13 years ago)
Ag-Chieve, could you please post the embed code and video link(exactly as you used it that worked) so that I can test it myself? I can use a second device, and if I know that yours worked, i will at least know that it is not the coding. Thanks
 
Ag-Chieve
Lost but trying
Profile
Posts: 124
Reg: Apr 16, 2012
Winnipeg
9,090
like
07/11/12 09:52 AM (13 years ago)
I pasted this straight into the custom html plugin page in source view. <iframe width="560" height="315" src="http://www.youtube.com/embed/DbOdkEFvd-w" frameborder="0" allowfullscreen></iframe>
 
kingstonsymphony
I hate code!
Profile
Posts: 47
Reg: Jun 29, 2012
Kingston
1,820
like
07/11/12 10:05 AM (13 years ago)
Shout, tried it and it doesn't work on the device or tablet. Tablet still plays only audio. On the emulator, the image pops up, playbar comes up, but it won't play. So very strange.
 
Ag-Chieve
Lost but trying
Profile
Posts: 124
Reg: Apr 16, 2012
Winnipeg
9,090
like
07/12/12 07:06 AM (13 years ago)
I had a thought last night. Have you tried just pasting the embed code into an empty custom html plugin to see if even that works for you? The custom html plugin I pasted it into was largely empty except for a bit of text at the top and I pasted the embed code well below the text. If you can get the video alone to work for you, then you can build the page around the video. Just a thought. Good luck with it. Keep experimenting with it. Sometimes what you want to do doesn't quite work but then you can come up with an adequate workaround if you keep playing with things and constantly testing them.
 
kingstonsymphony
I hate code!
Profile
Posts: 47
Reg: Jun 29, 2012
Kingston
1,820
like
07/12/12 07:45 AM (13 years ago)
hey Ag Chieve, thanks for the advice. Put a random youtube video into a cutom url, and the video still won't play. It pops up in a separate link, but when you press play, it still refuses to buffer or play at all.
 
Ag-Chieve
Lost but trying
Profile
Posts: 124
Reg: Apr 16, 2012
Winnipeg
9,090
like
07/12/12 07:53 AM (13 years ago)
But if you paste the embed code straight into an empty custom html5 plugin page (so that the video is the only thing on the page) that still doesn't play? (What devices are you using for testing, by the way?)
 
kingstonsymphony
I hate code!
Profile
Posts: 47
Reg: Jun 29, 2012
Kingston
1,820
like
07/12/12 09:22 AM (13 years ago)
Audio only plays in the HTML 5 custom page. Linke does not appear in the page, just a black screen, that if you tap around, will play the audio. I've been testing on both an emulator and on a lenovo tablet.
 
EDSE447
Apple Fan
Profile
Posts: 3
Reg: Nov 11, 2012
Edmonton
5,330
like
11/15/12 11:01 PM (13 years ago)
Hey guys, did anyone find a solution to this problem? I'm having the exact same issue and have tried all of the same solutions to no avail...
 
AlmaR
Lost but trying
Profile
Posts: 73
Reg: Jun 13, 2011
location unknow...
5,630
like
03/01/13 02:56 PM (12 years ago)
Below is a workaround from @perrytheweaver: In the Eclipse BZ project force html links to load in mobile phone's native browser: /src/com/nameofyourprogramapp/BT_act_controller.java canLoadDocumentInWebView() Add a file type (or url snippet) to: doNotLoadList.add("youtube.com"); doNotLoadList.add("youtu.be"); https://www.buzztouch.com/forum/thread.php?tid=2AA2085F8EE542275D3CADB&fid=5FE1FB2355A48AD674A6CA3&sortColumn=FT.id&sortUpDown=DESC&currentPage=1
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.