Embed YouTube Video On A Screen?
BlitzMax Forums/BlitzMax Programming/Embed YouTube Video On A Screen?
| ||
Is this even possible, if so... how? Thanks. |
| ||
You would either have to embed html in a html gadget using MaxGUI (or similar), or download the video (FLV) and play it using embedded Flash somehow. Both are possible. |
| ||
Thanks Beaker. hmm... don't use MaxGui, I wonder if there is a 3rd party gadget for this? |
| ||
gameswf may be useful. Except it's C++.... It's 'pre-alpha' code... ...And it only works in OpenGL (win/mac/linux). Not much, but could be worth trying to wrap it for max if it actually does basic flash video (which the update mentions). |
| ||
Thanks, I was thinking of embedding youtube vids in an upcoming project for tutorial purposes without having to include them in the dsitribution or hosting them on my site. hmm... |
| ||
' createhtmlview.bmx Import MaxGui.Drivers Strict Local window:TGadget Local htmlview:TGadget window=CreateWindow("My Window",30,20,600,440,,15|WINDOW_ACCEPTFILES) htmlview=CreateHTMLView(0,0,ClientWidth(window),ClientHeight(window),window) SetGadgetLayout htmlview,1,1,1,1 HtmlViewGo htmlview,"www.youtube.com" While WaitEvent() Print CurrentEvent.ToString() Select EventID() Case EVENT_WINDOWCLOSE End End Select Wend eek, no adblock! hmm, jscript crashed after i clicked on a movie |
| ||
@skid Did you think about extracting the video url and creating a "local" website embedding that video? Or just embed a specific "iframe" (like if you embed a video in your board/website). This would get rid of the "surroundings" of a video in a default youtube video page. Also you should check if the returned code is for html5 and not flash videos. PS: your code draws this: Error - File not found Unable to find the file at www.youtube.com Edit: ... does NOT work for me but uses the iframe approach. When calling opening the html file in the browser it tries to load a flash video - even with html5 param... hmpf. But maybe it helps. bye Ron |
| ||
what platform are you on? |
| ||
Linux I edited something into my previous post. bye Ron |
| ||
the following url should give you a nice full window youtube video http://www.youtube.com/v/IEIWdEDFlQY with win32maxguiex driver it throws a Windows exception EXCEPTION_ACCESS_VOLATION, which it may do with all flash content these days :( |
| ||
Not on my linux box (64bit): for HtmlViewGo htmlview,"https::www.youtube.com/v/IEIWdEDFlQY" ![]() Same for "https://www..." Of course it shows a big video when opening the url in the real chrome/ff. @64bit Means I do not have the webkit or mozilla webview but a more basic one (see the discussion about it in the "InDevIDE"-thread) bye Ron |
| ||
I doubt any of the drivers recognise the https form |
| ||
What should happen when I click on it?GadgetAction: data=0, mods=0, x=0, y=0, extra="https://www.youtube.com/v/IEIWdEDFlQY" But nothing more. bye Ron |
| ||
I mean in your linux browser (here=the link i posted above), not from blitzmax program. |
| ||
Same for "https://www..." Of course it shows a big video when opening the url in the real chrome/ff. bye Ron |
| ||
[grabs macbook] is there an html5 parameter for /v/ format ? |
| ||
My (unreleased/wip) CEF module can do this. I've had it playing youtube videos on a Max2D screen... if you like that kind of thing. |
| ||
the html5 param got removed - but some users mention it to still work. Seems the "browser" you are using should emit somehow that it understands html5 or set "html5 = true" for youtube (like if you do that manually when visiting youtube.com). Edit: I tried it on my xubuntu 12.04 32bit - same output as on my local 64bit machine (and nothing happening when clicking on it). Feel free to send me your linux binary to test it: ron@... bye Ron |
| ||
cocoaMaxgui www.youtube.com yes http://www.youtube.com yes https://www.youtube.com no /v/ format no win32MaxguiEx www.youtube.com unstable http://www.youtube.com unstable https://www.youtube.com no /v/ format no I think the unstable win32 stuff can be addressed with silencing the script error handler |