Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2014-08-18 00:57:08

Nuevolab
Member
Registered: 2012-08-01
Posts: 189

Nuevoplayer minor update & some tips

Recentlly I updated Nuevolab.com website and during last few days I made it responsive one.
And this was also the reason I updated Nuevoplayer javascript with few minor tweaks.

1. For better responsivity and visibility of HTML5 version I've added option "minicontrols" by default set to true.
This cause that when site is smaller than 450px, Nuevoplayer use HTML5 native controlbar. It's pretty smart option, well visible on small mobile devices.
Usually when such device in portrait mode it's 320px wide and so Nuevoplayer automatically switches to native controls. But when you rotate device to landscape mode it uses normal controls.
Native controls on very narrow layout are much better visible and easier to control.
Of course on tablets this will be always normal controls.

2. Added "absolute" display style for video and youtube HTML5 blocks. For some reason on some androids both object were repositioned and invisible. Now it's always on top in right position and visible.

3. Changed rules for reading multiple media files for HTML5 player. For example if you assign mp4, webm and ogg (ogv), Nuevoplayer will pick them all and list as possible video sources. Device decides which one to play.
This also concerns HD versions of all mentioned formats.
Soon I will write some longer tutorial on how to use it all.
On Nuevolab.com homepage website we assign mp4, webm and ogg of same video, also mp4hd and webhd. It's pretty advanced usage for demanding people.

4. We tweaked flash version of Nuevoplayer for live streams. As one of very few players Nuevoplayer is able to reconnect live stream. If you try to reconnect (resume) stream with JW or Flow, player will just die.
Just take a look at our live stream example streamed from some Dutch live camera. Try to pause stream and play again. It will connect and play properly!
http://www.nuevolab.com/live.php

For all integrations today (August 18) we have updated recent version of "player.js" and "player.swf" files. In case of ASP script it's located in "modules/video/player/nuevo/player" directory.


Finally as we were inquired with question about player for responsive layout:

Both versions of Nuevoplayer (flash and html5) are responsive according to it's parent element.
But you need some tricks and css styling to achive real responsivity (width and height), such as seen on Nuevolab.com website.

Here's short tyutorial how to do it.
Let's say you want to have a player object with initial 800px width and 16:9 aspect ratio.

1. Create <div> object with style {margin: auto;max-width: 800px;}
2. Inside create another <div> object with some padding percent valid for 16:9 aspect ratio:
{ position: relative; height: auto; padding-top: 56.25%; }
3. Create one more <div> object with style {display: block;height: 100%;max-height: none !important;max-width: 100%;min-height: 0 !important;position: absolute;top: 0;width: 100%;}

Now you can insert empty div for Nuevoplayer with some id and below Nuevoplayer javascript code which later will replace <div> with id.

So the code may look like:

<div style="margin: auto;max-width: 800px;">
<div style="position: relative; height: auto; padding-top: 56.25%;">
<div style="display: block;height: 100%;max-height: none !important;max-width: 100%;min-height: 0 !important;position: absolute;top: 0;width: 100%;">

<div id="nuevoplayer"></div>
...Nuevoplayer javscript code here

</div>
</div>
</div>

I know that most of people here do not understand a lot of from this tutorial, but I believe still some may find it useful.

Thanks for attention.

Last edited by Nuevolab (2014-08-18 01:47:17)

Offline

Board footer

Powered by FluxBB