amauriaces / mp-onlinevideos2

Automatically exported from code.google.com/p/mp-onlinevideos2
0 stars 0 forks source link

Show playback options before playlist playback #71

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

If SiteUtil uses playlist player (getMultipleVideoUrls returns more than 1 
video link), it is impossible to select playback option.

I would like to use hoster resolving for each video, combine the common 
qualities on each video and present those to user before playback.

link = YouTube 1
video link 1 = flv - 320x240
video link 2 = flv - 800x600
video link 3 = mp4 - 1280x720

link = YouTube 2
video link 1 = flv - 320x240
video link 2 = mp4 - 1280x720
video link 3 = mp4 - 1920x1080

In this case , common playback options are flv - 320x240 and mp4 - 128x720.

Right now, I'm limited to choosing the quality from util, which is not so bad 
but user choice could be better :)

Original issue reported on code.google.com by mitja.skuver on 23 Jan 2011 at 7:04

GoogleCodeExporter commented 9 years ago
I attached a patch for current SVN, which adds a new function that can be 
overriden in the siteutil -> "getPlaylistItemUrl". It will be called before 
playback of an item in a playlist starts, so the util can fill playbackoptions 
(or return single url) for that new video just in time. 

The reason as discussed in IRC is: links to videos often have timeouts so 
retrieving all playback urls at the start of playing a list is not going to 
work.

Let me know if this works kind of in the way you need.

Original comment by bborgsd...@gmail.com on 24 Jan 2011 at 9:02

Attachments:

GoogleCodeExporter commented 9 years ago
I think it might be a step in the right direction, however when i get in 
"getPlaylistItemUrl", cloned VideoInfo object contains already resolved link.

I could add first link resolved and others unresolved links in 
"getMultipleVideoUrls" and resolve them in new overridden method but that's 
"one way street". If moving back in playlist (from part 3 to 2 for example), 
URLs are already resolved.

Original comment by mitja.skuver on 25 Jan 2011 at 7:52

GoogleCodeExporter commented 9 years ago
Actually it's the right way to go:
On first call, return the list with unresolved urls. They will be put into 
their own VideoInfo objects, which are passed on the following calls. If you 
don't overwrite the VideoUrl property, but instead only return the resolved url 
(as single entry in the list) and set the playbackoptions, you can do that on 
every call again.

I hope I got that explained somehow understandable ;)

Original comment by bborgsd...@gmail.com on 25 Jan 2011 at 8:49

GoogleCodeExporter commented 9 years ago
First call of which method? If return unresolved list in 
"getMultipleVideoUrls", first video is unresolved and cannot be played.

Perhaps the error is that "getPlaylistItemUrl" is not called for first vid?

Original comment by mitja.skuver on 25 Jan 2011 at 8:59

GoogleCodeExporter commented 9 years ago
Thanks for the help on IRC! I think, with the small fix we did with first 
cloned VideoInfo, this is working quite nicely :) Good night!

Original comment by mitja.skuver on 25 Jan 2011 at 11:27

GoogleCodeExporter commented 9 years ago
Thanks! Here is a new patch (for trunk) that also includes the info about what 
playbackoption was chosen by the user on the first video.

Original comment by bborgsd...@gmail.com on 26 Jan 2011 at 1:10

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks! Can confirm this is working as expected :) Great job!

Is there a reason for baseVideoInfo argument in getPlaylistItemUrl? Cannot 
think of a use-case for it :)

Original comment by mitja.skuver on 26 Jan 2011 at 9:44

GoogleCodeExporter commented 9 years ago
Found a minor glitch. If i cancel playback options dialog when skipping from 
one video to next, playlist player seems to get confused about which file is 
playing. Debugging.

Original comment by mitja.skuver on 26 Jan 2011 at 9:49

GoogleCodeExporter commented 9 years ago
Playlist index is increase when OV GUI receive the message to skip track.
GUIOnlineVideos.cs: OnMessage(GUIMessage message)

The index is not reset if we cancel the playback options (or anything other 
than that) happens afterwards.

I guess similar thing can happen after
GUIOnlineVideos.cs: g_Player_PlayBackEnded

Maybe not because if we cancel the dialog after playback, it will stop :)

Original comment by mitja.skuver on 27 Jan 2011 at 11:56

GoogleCodeExporter commented 9 years ago
Found one more issue. It has to do with added "(url == loUrlList[0]) ? check 
and might be more complicated.. Would be best if you would ping me on IRC :)

Original comment by mitja.skuver on 27 Jan 2011 at 2:26

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1135.

Original comment by bborgsd...@gmail.com on 27 Jan 2011 at 6:24

GoogleCodeExporter commented 9 years ago
Small additional fix to test for cancelling Playbackoptions dialog while 
skipping in Playlist.

Original comment by bborgsd...@gmail.com on 27 Jan 2011 at 7:48

Attachments:

GoogleCodeExporter commented 9 years ago
As said, this works great and it's a proper thing to handle playlist like that 
anyhow :)

Now I see you added it to trunk :) Thanks and great job on this one!

Original comment by mitja.skuver on 28 Jan 2011 at 8:01

GoogleCodeExporter commented 9 years ago

Original comment by bborgsd...@gmail.com on 5 Apr 2011 at 3:42