Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,154,170 members, 7,821,970 topics. Date: Wednesday, 08 May 2024 at 11:02 PM

Programmers How Would You Approach This Task? - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Programmers How Would You Approach This Task? (1078 Views)

Programmers, How Is This Recession Affecting Your Work? / Explaining To Non-programmers How Complex Software Development Is / Programming Competition: Search Engine Task. Rewards up for grabs. (2) (3) (4)

(1) (Reply) (Go Down)

Programmers How Would You Approach This Task? by JackOfAllTrades: 5:34pm On May 11, 2015
A friend of mine also a nairalander, had this issue of trying to emulate a live TV website.
he had 6 videos but he wanted all video to play like a playlist, now the main task is when video a is playing in it's 7th minute since you're are just coming in you should continue from that 7th minute, and when you refresh your browser the video should still continue from 7 minutes and some seconds upwards, and when another visitor comes in 4 minutes later that visitor should continue from 7 + 4 = 11 minutes, in other words all visitors should be watching the same video @ the same time and video time elapsed should be the same just like a live TV cool
Re: Programmers How Would You Approach This Task? by CrazyScientist: 5:38pm On May 11, 2015
JackOfAllTrades:
A friend of mine also a nairalander, had this issue of trying to emulate a live TV website.
he had 6 videos but he wanted all video to play like a playlist, now the main task is when video a is playing in it's 7th minute since you're are just coming in you should continue from that 7th minute, and when you refresh your browser the video should still continue from 7 minutes and some seconds upwards, and when another visitor comes in 4 minutes later that visitor should continue from 7 + 4 = 11 minutes, in other words all visitors should be watching the same video @ the same time and video time elapsed should be the same just like a live TV cool

VOTE TWACI ANDROID I'LL TELL YOU! grin

1 Like

Re: Programmers How Would You Approach This Task? by AAinEqGuinea: 6:55pm On May 11, 2015
JackOfAllTrades:
A friend of mine also a nairalander, had this issue of trying to emulate a live TV website.
he had 6 videos but he wanted all video to play like a playlist, now the main task is when video a is playing in it's 7th minute since you're are just coming in you should continue from that 7th minute, and when you refresh your browser the video should still continue from 7 minutes and some seconds upwards, and when another visitor comes in 4 minutes later that visitor should continue from 7 + 4 = 11 minutes, in other words all visitors should be watching the same video @ the same time and video time elapsed should be the same just like a live TV cool

Sounds like standard Livestream (minus user controls), just using your friend's 6 videos as the stream. I've never had a case like this, but I'd suggest looking into how passive streaming services are implemented
Re: Programmers How Would You Approach This Task? by JackOfAllTrades: 8:09pm On May 11, 2015
I would check that out meanwhile more input are welcome @gurus in the house cool
Re: Programmers How Would You Approach This Task? by bb6xt(m): 9:09pm On May 11, 2015
An easier way to go about it is to have a fixed point of reference in time. Say for example you played the first video at 10.00 am UTC and a visitor comes in 10 minutes later a DOM ready callback should check the current time in the same time zone as the one used by the server as a reference point and skip that much ahead on the video or play the next one at the proper time if the first would have finished.

But this is a hack and I haven't done it before but I think it is possible to implement it this way.

1 Like

Re: Programmers How Would You Approach This Task? by JackOfAllTrades: 10:58pm On May 11, 2015
bb6xt:
An easier way to go about it is to have a fixed point of reference in time. Say for example you played the first video at 10.00 am UTC and a visitor comes in 10 minutes later a DOM ready callback should check the current time in the same time zone as the one used by the server as a reference point and skip that much ahead on the video or play the next one at the proper time if the first would have finished.

But this is a hack and I haven't done it before but I think it is possible to implement it this way.
yea that makes sense but since JavaScript is a client language it best to let the server set the timezone and figure out what time the visitor came in and pass it to the JavaScript so the JavaScript times won't be different. yeah it's a hack
Re: Programmers How Would You Approach This Task? by JackOfAllTrades: 11:09pm On May 11, 2015
Re: Programmers How Would You Approach This Task? by JackOfAllTrades: 1:05pm On May 13, 2015
Wow I finally came up with an algorithm for this cool and its working perfectly, thanks guys for your inputs

(1) (Reply)

Python Pros. . .please Help!!! / Please Help With Authentic Dreaweaver Cs5 Serial Number / C# Programmers, Solve This Question

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 17
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.