supernginx / flowplayer-core

Automatically exported from code.google.com/p/flowplayer-core
0 stars 0 forks source link

bwcheck and bitrateselect plugins cause error when loaded together #563

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Sample page http://flowplayer.blacktrash.org/test/bwcheck-brselect.html
2. bwcheck config has checkOnStart: true, switchOnFullscreen: false

What is the expected output? What do you see instead?
Expected: bwcheck sets the first bitrate
Instead: this error:
[ERROR] time 17:35:16.151 :: 300: Player initialization failed: TypeError: 
Error #1009
(anonymous function)

I was under the impression that you could not chain these plugins together, but 
according to http://flowplayer.org/forum/8/100081#post-100249 one should be 
able to.

Original issue reported on code.google.com by blacktrashproduct on 21 May 2012 at 4:41

GoogleCodeExporter commented 8 years ago
try and switch it around, bitrateselect sets the default bitrate, then 
bandwidth check provides the correct initial bitrate. 

Original comment by dani...@electroteque.org on 21 May 2012 at 4:58

GoogleCodeExporter commented 8 years ago
Doesn't make a difference.

And wouldn't the whole purpose be to have _bwcheck_ select the default bitrate 
by checkOnStart for bitrateselect?

Original comment by blacktrashproduct on 21 May 2012 at 9:34

GoogleCodeExporter commented 8 years ago
The logic really shouldn't matter on the end user, have a look at the demo here

http://flowplayer.electroteque.org/youtube#bwcheck

I'll try a load up another example with the menu plugin then. 

bitrateselect first then bwcheck last because its the one choosing the bitrate 
on startup. then you can use the bitrateselect plugin to set bitrate. 

Original comment by dani...@electroteque.org on 22 May 2012 at 4:12

GoogleCodeExporter commented 8 years ago
OK i see the break. because of this mess with the menu plugin , bitrateselect 
is initializing onload not during resolving ;) Will try and figure something 
out. 

Original comment by dani...@electroteque.org on 22 May 2012 at 4:47

GoogleCodeExporter commented 8 years ago
It needs to generate the stream selection here to be able to call the switch 
api properly with the menu. Will try and figure out a solution. 

Original comment by dani...@electroteque.org on 22 May 2012 at 5:37

GoogleCodeExporter commented 8 years ago
Working on a solution to switch it around. It means the hd toggle won't work in 
this combination also. 

Original comment by dani...@electroteque.org on 22 May 2012 at 12:30

GoogleCodeExporter commented 8 years ago
Its getting there the biggest problem of them all and has been for a while is 
both plugins have to share the same stream selection manager which generates 
the bitratelist, because of some code to initialize the menu plugin onload not 
while resolving, the stream select inside bitrateselect is used and because of 
this even after fixing up the problem, it is not choosing the bitrate for the 
bandwidth it needs to use the one in bwcheck. 

Original comment by dani...@electroteque.org on 22 May 2012 at 2:41

GoogleCodeExporter commented 8 years ago
A cleaner solution is to disable the menu button until everything has resolved 
and stream has begun playback. I think that is better UI than making the menu 
available while its still loading ?

Original comment by dani...@electroteque.org on 22 May 2012 at 3:27

GoogleCodeExporter commented 8 years ago
Some more changes are required now to automatically make selections in the menu 
plugin. Made an option to obtain the menu button to be able to disable it. 

Original comment by dani...@electroteque.org on 22 May 2012 at 4:21

GoogleCodeExporter commented 8 years ago
http://dl.dropbox.com/u/3394987/flowplayer.bitrateselect-3.2.10.zip
http://dl.dropbox.com/u/3394987/flowplayer.bwcheck-3.2.10.zip
http://dl.dropbox.com/u/3394987/flowplayer.menu-3.2.9.zip

Please try these combinations. 

configuration urlResolvers: ["bwcheck","bitrateselect"]

Original comment by dani...@electroteque.org on 22 May 2012 at 6:07

GoogleCodeExporter commented 8 years ago
With your files this combination works form me, but there is a glitch. Menu 
items are disabled by default. They are set to enabled if video goes to the end 
and is started again.

Also if switchOnFullscreen is true and bitrate is changed by bwcheck, items are 
not toggled in menu.

Original comment by krzyszto...@gmail.com on 22 May 2012 at 10:05

GoogleCodeExporter commented 8 years ago
Ok i'm going to make the selections on a switch event. 

The menu has to be disabled from clicking until the bitrates have resolved and 
there is items in the list which is when it will enable again. IS this not 
happening for you ?

Original comment by dani...@electroteque.org on 23 May 2012 at 4:05

GoogleCodeExporter commented 8 years ago
On first clip start all menu items are added, but disabled:

[LOG] time 08:01:08.444 :: org.flowplayer.menu.ui::Menu : addItem(), color == 
16777215, overColor == 90069
[LOG] time 08:01:08.444 :: org.flowplayer.menu.ui::Menu : createItem(), label 
== Bardzo dobra
[LOG] time 08:01:08.444 :: org.flowplayer.menu.ui::MenuItem : setEnabled(), new 
enabled value == false

When clip ends and I play it again menu items are enabled and work as intended:

[LOG] time 08:03:24.948 :: org.flowplayer.menu.ui::Menu : enableItems()
[LOG] time 08:03:24.964 :: org.flowplayer.menu.ui::MenuItem : setEnabled(), new 
enabled value == true

Original comment by krzyszto...@gmail.com on 23 May 2012 at 6:07

GoogleCodeExporter commented 8 years ago
I've tried this and its working OK for me with pseudostreaming

http://test.our-africa.org/static/flowplayer/bwcheck-bitrateselect.html

Bit rate switching is buggy with pseudostreaming and these bugs persist but 
bwcheck and bitrateselect are working together

Original comment by anthonyg...@gmail.com on 23 May 2012 at 12:19

GoogleCodeExporter commented 8 years ago
I will test and produce another bug report, and close this for now thanks. 

Original comment by dani...@electroteque.org on 23 May 2012 at 5:10

GoogleCodeExporter commented 8 years ago
see here http://code.google.com/p/flowplayer-core/issues/detail?id=568

Original comment by dani...@electroteque.org on 23 May 2012 at 5:11

GoogleCodeExporter commented 8 years ago
I made a mistake of not clearing browser cache and temporary files. Please 
disregard my remarks about menu items not being enabled on clip start. It is 
working fine.

Original comment by krzyszto...@gmail.com on 23 May 2012 at 5:19