I'd like to build a page for mplayerplug-in that when loaded plays a movie automatically, and in full screen, and loops (smoothly) indefinitiely.
Now my understanding from previous posts is that using loop="yes" in the embed tag is the way to get smooth looping. But after experimenting, and then looking at the code, it seems like one cannot specify fullscreen="yes" in the embed tag, it has to be set afterwards. The problem with this is that once the movie loops, it is no longer in fullscreen mode.
I've tried using onMediaComplete instead of the loop option, but it causes a small jump between loops.
So before I write a small patch to add fullscreen to the embed tag, I just wanted to check if anyone has a better way of doing this?
Currently what you want to do is not in the code. However, I would take a patch for it.
You'll have to edit plugin-setup.cpp to add the embed tag
You'll have to edit plugin-thread.cpp to only call the SetFullScreen = 0 in the loop if the embed loop and embed fullscreen tags are present
This is gonna be kinda of a tricky problem to solve.
Have you thought about trying to solve this problem at the browser level. of course that would still leave you with the window boarder. at minimum
OK, will have a poke at the code over the weekend.
Could you explain what you mean by solving "the problem at the browser level"?
Did a very quick alteration to plugin-setup.cpp to add the embed fullscreen tag, haven't changed anything else yet, but setting fullscreen="true" crashes the browser with a segfault. This happens in the SetFullscreen method in plugin.cpp when it calls:
Any pointers (no pun intended) appreciated.
I would guess you are switching to fullscreen mode prior to SetWindow being run and so gtkwidget has not yet been initialized.
Managed to cobble something together at the browser level like you mentioned before, using large "height" and "width" values and the autohide plugin for firefox to hide all menus.
It's not pretty though, especially the grey box at the bottom of mplayerplug-in which is where the controls would normally go I guess?
Did you set showcontrols='0' in the embed tag?
Yup, there's no sign of the controls, just a narrow grey box below the video.
Try adding this to the HTML
<body style="background:#000000; background-color:#000000;">
See if that helps
Thanks for all the help :)
It looks like it's a scaling issue, if I have a movie of size 720x480 for example, I have to specify height and width embed values in the ratio of 1.5, otherwise mplayerplug-in pads the bottom of the movie with a grey box so as to maintain the movie scale, but still give me the output size I asked for. If I do my sums right then I can get rid of this grey box, and things look quiet nice. The nice thing about the fullscreen option though is that "it just works".
Nope, it actually plays for about a second before segfaulting, and the debug output shows two pairs of
*****SetWindow Callback Enter************
***********SetWindow Callback Exit**************
OK, the problem was with fs_window not being initialised. Now I need to figure out how to make fullscreen persistent across loops....
On a related note, I'm currently seeing a "blip" between loops of the video (looks like a quick flash of a white screen), and I'm not sure why this is happening.
With debugging turned on, I get the message:
"Starting: mplayer -wid 0x3c00127 -xy 1000 -vo x11 -zoom -user-agent NSPlayer -osdlevel 0 -nojoystick -noconsolecontrols -cookies -slave -loop 0 -fixed-vo -rtsp-stream-over-tcp -nomouseinput -cache 512 /home/cian/movies/theshapeofdays/ww_H.264_768_audio.mov"
And running this from the command line (without "-wid 0x3c00127") plays the movie in a loop without any blip.
I've tried with xv, and x11 video output, but with similar results, am I missing something obvious?
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.