JWPlayer for Fullscreen Background Video
Asked Answered
A

2

9

I'm looking to use jwPlayer for fullscreen background video that simply plays in a loop as the background of the site.

I'm testing this here, with moderate success in Chrome on Mac OSX (please excuse the size of the video file) - dextersgospel.com/full-screen-video.html

On page load, I grab the width and height of the browser window and set the values as the width and height parameters in jwPlayer setup. Awesome.

Now what I would like to add is functionality that resizes the video if the browser window is resized. I've looked into the onResize() and onFullScreen() events, but can't figure out how to implement those to make this work (or tell if those are even the solution). I've also looked into the jQuery resize() function, to no avail.

I would also like to prevent the video from being paused when clicked.

If anyone could provide some tips on how to use jwPlayer for fullscreen background video, it would be much appreciated!

Apian answered 15/2, 2012 at 19:39 Comment(1)
Adding this to my document.ready seemed to do the trick: $(window).resize(function(e) { var new_w_height = $(window).height(); var new_w_width = $(window).width(); jwplayer("video").resize(new_w_width, new_w_height); });Apian
D
2

you can use http://dfcb.github.io/BigVideo.js/ . This does it quite well. Also you can refer to discussion here on How to use JWPlayer to play videos in the background of a web page

Hope it helps :)

Danner answered 3/9, 2013 at 15:27 Comment(0)
R
0

Use Full screen mode

setFullscreen(state)

http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/12540/javascript-api-reference#Function

Recuperate answered 10/9, 2012 at 13:27 Comment(2)
full screen isn't the same as using it as a background.Teem
jwplayer official says they don't have setFullscreen(state) method. where did you get this info from?Accelerant

© 2022 - 2024 — McMap. All rights reserved.