Explore the community Forums Lectora Lectora Questions & Answers Full-screen video via JavaScript Reply To: Full-screen video via JavaScript

#418372 Score: 0
Profile photo of Darrel Somoza
Darrel Somoza
Member
contributor
friend finder
beginner
intermediate
junior moderator
advanced
wise owl
curious george
profile
209 pts
@Klaatu

It may look it but it is not obfuscated. The “min” in the name indicates the script is minimized (standard in JavaScript). It has all whitespace, comments and formatting removed as it is not needed for the interpreter and slows things down. If you download the player source files from their website you can look at the un-minimized version which is easy to read and heavily commented. This is very helpful to understand how it works – if you understands JS.

Yes, you can set the “stretching” parameter to ‘auto’, ‘responsive’ or ‘fill’. I didn’t include this opting instead to have you size the video and player the same. I suppose if you are building in responsive mode in Lectora you’d want that set to responsive or maybe fill depending on your needs. Read through the API, this player is loaded with awesome features and some very talented people have contributed valuable plugins (like skip back). The application programming interface is always a good thing to become familiar with when using any JavaScript library.

Odd behavior in the LMS. I don’t think that should be happening. What you describe is the feature triggering (hence the change in the icon) but it is not going full screen, correct? Until I can test, the only thing I can think of is that your LMS is set to open a course in a new window and maybe that is somehow effecting the full screen feature from working properly? Interesting.

You can accomplish most, if not all, of these things by manipulating the built in mediaelement player, however, the folks at Trivantis/StoneCalibre have made it ridiculously difficult by the way they implement it (don’t get me started..). It is, therefore, MUCH easier to just pop in your own version of the player when needed to give yourself simple and complete control over all it’s features.