Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VideoJS options and quality switch #3

Closed
devmondo opened this issue Jul 4, 2014 · 33 comments
Closed

VideoJS options and quality switch #3

devmondo opened this issue Jul 4, 2014 · 33 comments
Labels

Comments

@devmondo
Copy link

devmondo commented Jul 4, 2014

Hi,

-are the Configuration options available in VideoJs implementation?
-can we do quality switch?

thanks in advanced.

@mangui
Copy link
Owner

mangui commented Jul 9, 2014

Hi @devmondo

regarding config options, i didnt find any tricks to provide params from JS to Flash using videoJS.
regarding quality switch, manual switching from API is straightforward but it would also require some UI changes on videoJS, on which I have no interest/expertise.

Cheers,
Mangui

@mangui mangui added the question label Jul 9, 2014
@devmondo
Copy link
Author

@mangui thank you very much,

regarding switching from API manually, is there documentation on that ?

@mangui
Copy link
Owner

mangui commented Jul 16, 2014

Hi @devmondo

there is no doc, but it is pretty straightforward, from your org.mangui.hls.HLS instance
hls.level = manual_level;
(hls.level = -1 for auto mode)

see https://github.com/mangui/flashls/blob/master/src/org/mangui/hls/HLS.as#L76-L94
Cheers,
Mangui

@triwav
Copy link

triwav commented Jul 16, 2014

Hi Mangui. You're saying by passing flash params (videojs.options.flash.flashVars) you can't specify those options? I tried looking at the source to see if I could somehow hard code settings but I'm afraid I'm pretty weak at flash. You mentioned using the API but I don't see any reference to that. Appreciate your help.

@devmondo
Copy link
Author

@mangui thank you very much for your support, but i am as stuck as @triwav :)

i fear i am as weak in flash as him, and what i can do is develop a plugin for VideoJs to create a button to switch quality, but i don't know how to pass it to your flash player.

@ohmercy
Copy link

ohmercy commented Jul 18, 2014

@mangui regarding config options:
Setting flashvar params in the embed code generated by video-js seems to work, using paramvideojs.options.flash.flashVars.
Apparently video-js.swf is ignoring the hls_* options passed.

This example contains the embed code generated by video-js
http://demo.cdn01.rambla.be/raplay/flashhls-videojs.html
The same embed code, but using GrindPlayer.swf + flashlsOSMF.swf
http://demo.master.cdn01.rambla.be/raplay/flashhls-grind.html

Both have hls_capleveltostage=true, video-js still loads the highest resolution available in the m3u8 while OSMF is using a lower level, as it should.

@triwav
Copy link

triwav commented Jul 18, 2014

@ohmercy that's an interesting observation. However, you'll obviously have a different look than the videojs player and I would assume none of the callbacks would work either. I've temporarily solved this by building it myself. The settings can be found here: https://github.com/mangui/flashls/blob/master/src/org/mangui/hls/HLSSettings.as

You have to compile flashls then take the output file and put that in the jw-player-swf and compile that.

@ohmercy
Copy link

ohmercy commented Jul 18, 2014

@triwav I only isolated the relevant (object) HTML markup generated by video-js, to show the hls_ options are present as flashvars and how both swf plugins handle these flashvars different.
Did not mean to suggest it as an alternative embed method.

Thanks for the tip! Being able to choose different default values is already a step forward.

@triwav
Copy link

triwav commented Jul 18, 2014

So it would appear that the stage size must not be getting properly passed to the script. I've turned on capleveltostage and it just stays on the lowest level. My guess is it's defaulting to 0 thus it's the lowest level always. Could be an error on my side but that definitely puts a damper in things.

@hohno-panopto
Copy link

Hi @mangui,
I am considering to use flashls combining with video-js. As discussed in this thread already, I also want a little addition to its integration like passing hls_* options. I have some proposals of code change and the first tiny one was posted to your video-js-swf project as pull request. I wonder if you are interested in to take such changes.

@mangui
Copy link
Owner

mangui commented Aug 5, 2014

Hi @Hiroshi-p
regarding your PR on video-js-swf : mangui/video-js-swf#1, it is meant to print additional debug traces in case of level switch right ? this one I am not interested into it.
however any patch welcomed to pass hls_* options.
Cheers,
Mangui

@hohno-panopto
Copy link

@mangui,
Thanks. I will post another PR for hooking up hls_* options shortly.

Re: logging, I needed to make it because the trace message from flashls itself is not showed on JS console although the one from integration code (HLSProvider.as) is displayed. Is this a known issue of this integration?

@hohno-panopto
Copy link

@mangui,
As mentioned above, I created a new pull request.
mangui/video-js-swf#2
This hooks up all existing hls_* options through flashVars of videojs.
Proposed change is not at all elegant, but it does the job.
From JS code, those can be set something like this.
videojs.options.flash.flashVars = {
'hls_debug': true,
'hls_capleveltostage': true,
'hls_maxlevelcappingmode': 'downscale'
};

@hohno-panopto
Copy link

@mangui,
Thank you for taking my change to hook hls_* option. That did not include .swf itself because I might have different build environment from you and I was afraid that I could push incompatible one. Could you rebuild it at your spare cycle?
I have a next set of proposal to hook up flashls API to switch quality. I will create a pull request shortly.

@mangui
Copy link
Owner

mangui commented Aug 7, 2014

@Hiroshi-p
yes I will push swf shortly

@devmondo
Copy link
Author

devmondo commented Aug 8, 2014

sorry to sound like a noob but does this mean we can switch quality now :)

@hohno-panopto
Copy link

@devmondo,
Not yet. I proposed another change to achieve that part: mangui/video-js-swf#3
I expect a few iterations before @mangui becomes comfortable to take it.

@devmondo
Copy link
Author

devmondo commented Aug 9, 2014

@Hiroshi-p thank you very much man :)

@hohno-panopto
Copy link

@mangui,
Did you have a chance to look at this mangui/video-js-swf#3 ?

@mangui
Copy link
Owner

mangui commented Aug 13, 2014

Hi @Hiroshi-p , the changes looks ok, but I did not test them, I will try to do next week as I will take couple of days off.

@hohno-panopto
Copy link

@mangui,
Thank you for the reply. Not urgent at all. Enjoy your vacation!

@ohmercy
Copy link

ohmercy commented Aug 25, 2014

Capleveltostage seems to be broken in video-js-swf, as triwav mentions above. With hls_capleveltostage enabled, the lowest level is always playing, whatever the embed size of the video player.
Looks like _hls.stage is not set in AutoLevelManager.as

@aldfeu
Copy link

aldfeu commented Aug 26, 2014

@Hiroshi-p
Take a look at https://github.com/dacast I have implemented quality switch and reporting to videojs in flashhls + a videojs module to control it.

Hope it helps.

@mangui
Copy link
Owner

mangui commented Aug 26, 2014

Hi @ohmercy please recheck capleveltostage since last commits

@ohmercy
Copy link

ohmercy commented Aug 26, 2014

Hi @mangui capleveltostage is working now
Thank you!

@hohno-panopto
Copy link

Hi @mangui, thank you for pulling a change.
Level control feature which was added there requires a slight change of video.js side.
https://www.dropbox.com/s/l6g4v4bwtm3xbdx/video.js.diff
I wonder whether you want to fork video.js project here, so that flashls on video.js users may take the most advantage of that?

@hohno-panopto
Copy link

Hi @dacast, it looks like you have your own forked video-js.swf project for the feature. I have not looked at your change, but if you think your design is better than me, feel free to discuss with @mangui to replace mine with yours. I am fine even if my code is dropped as far as the feature is maintained.

@aldfeu
Copy link

aldfeu commented Aug 31, 2014

@Hiroshi-p

The basic of my videojs module design is the following:
3 differents message can achieve all possible quality actions:

  • on content load, it retrieves all existing quality levels. (
  • changing level does not change immediately the level in the player, because it can takes few seconds to be done (the next segment). It just notify the tech to change level.
  • on level changed in the tech, a message is sent to the player (in our case video.js) with the new quality level id, then I modified the selector in the menu

@mangui knows he can reuse my design when he wants.

From my opinion, there is no need to pull anything until video.js really implements bitrates/quality messages between player and techs.

I have commited a test page in dacast/video-js-swf-flashhls-menu.
It includes a working version built of videojs.swf (flashhls + my 3 messages i/o) and unminifed version of videojs (not modified) are in lib folder, so you can test it on any HLS stream (live and vod).

@hohno-panopto
Copy link

@dacast, thank you for the detail explanation. It sounds like you've already made the same scope of the changes in your own repository.

@ohmercy
Copy link

ohmercy commented Oct 16, 2014

Is it correct to say @dacast 's solution looks most interesting for now, as it can be implemented without changes in the video-js source?
@mangui any chance that design would make it into your repo?

@aldfeu
Copy link

aldfeu commented Dec 10, 2014

No change in video.js. The menu selector is a module.

There is just a trick for the display of the active quality used (and so remove highligth on other in the menu). Because menu items are not freely accessible (minified) from videojs.min.js, you may need, or to modify video.js (see exports.js) or to access the minified version of the items (ex something like vjs.N.c.b.a)

@mangui
Copy link
Owner

mangui commented Jun 29, 2015

closing, as https://github.com/mangui/video-js-swf provides API for quality switch

@mangui mangui closed this as completed Jun 29, 2015
@amrfaisal
Copy link

Is there a complete sample how to enable this feature using the latest video-js-sw fork?

mjneil added a commit to mjneil/flashls that referenced this issue Nov 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants