Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Audio Streaming using php

I need want some reference for a application, in which i will pre-define the time & song and at that time the song starts to play.

For Example, If I want to play a song at 8am. Then that song starts at that time only. Now if user "A" open my webpage at 8am then the song starts to play and other user "B" open webpage at 8:05am then the song must not play from start but both the user should get same audio i.e. user "B" will miss 5 min song.

Need some reference regarding this point.

like image 581
Tushar Sharma Avatar asked Jun 10 '26 01:06

Tushar Sharma


1 Answers

OK if you don't have any problem with the buffering and the speed then you can use the free version of jwplayer.

Extract the song and its playtime according to the time like its is 8:00pm when user opened the page then extract the song whose playtime and end time lies between the current time(8:00pm).

After that use seek function jwplayer like if the play time of the song is 7:55pm and end time is 8:10pm and the user opened the page on 8:00pm then seek the audio 5 min later with jwplayer('your_element').seek(5*60); to seek the video and play the video according to the time

like image 149
keshu_vats Avatar answered Jun 11 '26 19:06

keshu_vats



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!