google-code-export / flowplayer-core

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

Problem loading player with playlist #600

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.loading player with playlist

What is the expected output? What do you see instead?
Faster player loading, instead loading of player takes too long (about 10sec) 
and also browser is freezing while player loading playlist.

What version of the product are you using? On what operating system?
Same on all

Please provide any additional information below.
https://rapidshare.com/files/681619450/flowplayer_playlist_minimal_setup.rar

Original issue reported on code.google.com by boris.ma...@morescreens.tv on 22 Jun 2012 at 11:18

GoogleCodeExporter commented 9 years ago
Your external config file is huge at 600kb so this will incur time to download 
if not in the cache, I do however see  a delay once the file has completed and 
its likely due to adding the items to the playlist. 

Original comment by dani...@electroteque.org on 26 Jun 2012 at 12:10

GoogleCodeExporter commented 9 years ago
It's because of the massive playlist config, i'll see what is going on. 

Original comment by dani...@electroteque.org on 26 Jun 2012 at 12:23

GoogleCodeExporter commented 9 years ago
Yes it's massive playlist, but it shouldn't make such problem. 
As much as I see, there seems to be a few issues, PlaylistBuilder.createClip(), 
when calling PropertyBinder, and there's an issue with 
dispatchPlaylistReplace() called on Playlist. I'm sure these things can be 
optimized 

Original comment by borotock...@gmail.com on 26 Jun 2012 at 12:37

GoogleCodeExporter commented 9 years ago
good call, don't stess digging too much. Well I thought it would have been the 
json parsing as its now done natively in the newer flash version.

The first part is this slowing it down ! 

new PropertyBinder(clip, "customProperties").copyProperties(clipObj) as Clip;

I'll see if something can be done about it. 

Original comment by dani...@electroteque.org on 26 Jun 2012 at 2:20

GoogleCodeExporter commented 9 years ago
At first we thought that it was json too...

Yes, this first part is slowing it down, but the second is too. Without this 
property binding, it still takes him approximately 10 sec to load 

Original comment by boris.ma...@morescreens.tv on 26 Jun 2012 at 2:33

GoogleCodeExporter commented 9 years ago
Any progress on this one?

Original comment by boris.ma...@morescreens.tv on 29 Jun 2012 at 8:28

GoogleCodeExporter commented 9 years ago
I dont think so yet, its looping through the properties of each clip object, 
then adding the custom properties added to the custom properties config. 

The playlist is so huge to debug are you able to try this perhaps ? Your custom 
properties literally get added back to this. 

{ customProperties: {
   prop1: "test",
   prop2: "test2"
}
}

Original comment by dani...@electroteque.org on 29 Jun 2012 at 10:21

GoogleCodeExporter commented 9 years ago
Ok, we've managed to overcome this problem with binding properties, something 
like this:
for (var prop:String in clipObj) {
    if (clip.hasOwnProperty(prop)) {
        if (prop == "true" || prop == "false") {
            if (prop == "true") {
                clip[prop] = true;
            }else {
                clip[prop] = false;
            }
        }
        else if (prop == "scaling") {
            clip.setScaling(clipObj[prop]);
        }
        else {
            clip[prop] = clipObj[prop];
        }
    }
    if (!clip.customProperties) clip.customProperties = new Object();
    clip.customProperties[prop] = clipObj[prop];
}

and this is working in our situation, we are more concerned about this second 
part. 
It would be nice if you could help us with this part, 
dispatchPlaylistReplace(). What is this function doing, and can it be optimized?

Original comment by boris.ma...@morescreens.tv on 29 Jun 2012 at 10:34