ZionDevelopers / playx

In-game Internet (YouTube, Twitch, SoundCloud, mp4 and etc.) media player for Garry's Mod
http://steamcommunity.com/sharedfiles/filedetails/?id=106516163
Other
18 stars 14 forks source link

resume playing from the overall playing time instead of the time when you left the range #14

Closed X-Coder closed 11 years ago

X-Coder commented 11 years ago

Hi Nexus, you did a great job. I like this new range playing and GUI changes. I started to do something similar ago, in my cinema branch@gihub for playX. It worked too, but your's is so much nicer.

Do you think you can implement a option so the resume position of the video is not the the same when you left the range, but instead resume the position as if you didn't have left the range? (So that all players are seeing always see the same like they are in sync.) All you have to do for this is starting the resume from the position from time of start of the playing request and add the current time to this.

Maybe you can do it in a way so the clients or server owner can choose by a setting if they want to start the playing from the position they left the range, or from "live" position.

If you need the code for this I can lookup if I find it, I did it a while ago and it worked halfway.

nexbr commented 11 years ago

Imho That cannot be done, because the differences of the player's internet speed, Example: I have 1MB (120kbps) and you have 50MB (5000KBPS), you don't need buff your video, but i need, how to sync if when you are seeing at 2:40 i'm still buffering for 1:10 ? If you know how tell me.

And there is other problem, if the player was seeing at 2:55 he go away and the video got paused when he resumes he will be seeing at 5:20, and he will be missing the possible best part of the video.

As I said Imho that cannot be done without it messing up.

X-Coder commented 11 years ago

I understand what you mean. The second you describe as problem is the thing I see as a feature. Imagine a real cinema room, you walk out of the room, and come back later, don't expect they do a break :), the video would have continued playing. This setting should be optional, not the default, so the server owner or/and the player can choose in the settings which behavior he wants. So it doesn't get in conflict in the way like it currently works.

Ok, different connection speeds are leading into out of sync, because between buffering and starting the actual play could take some time, I can see that. It doesn't need to be a perfect sync, it would be ok for me if the resume starts at the time the playing request started + the time since the request started (+ some buffering time). This would only work for streams that support resuming of course, you discard old buffer and start buffering just from the new position.

nexbr commented 11 years ago

Well, I don't think this will work, I don't like the idea of i Loose Video Parts because other player have a better internet speed.

Sorry, but i cannot implement this kind of thing that players will for sure complain about it.

X-Coder commented 11 years ago

I think you got me wrong, you don't loose any video parts, it skips only the part when you were out of range for that specific player who was out of range, not for the other players. Like a real life cinema. The internet speed of the others doesn't matter, except it's only the problem to get the specific player exactly to the same position like the other who didn't leave the range, which is not possible and not needed to be this accurate.