OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How does YouTube make it play the video and audio separately and work in Safari

  • Thread starter Thread starter Micael
  • Start date Start date
M

Micael

Guest
I'm getting the data from the YouTube video with ytdl-core, however with videos above 1080p the video and audio files are separate, I would like to make it work without having to do any processing in the backend to join the video and audio or do something directly in the client side.

I can make it work normally on Android/Windows, but on Apple devices (Safari) there is a crash when I play both media files at the same time.

Remembering that I want to play the video in specific sizes, for example, 480p, 720p and 1080p and synchronize with the audio, the customer will manually select the video quality.

Is there any solution for this case?

I tried to place the video and audio elements directly in the html and synchronizing via javascript didn't work in safari

I tried leaving just the video in the html and the audio using the new Audio(url) api, but I didn't have a good result either.

I hope to be able to play the two synchronized media files directly on the client

<p>I'm getting the data from the YouTube video with ytdl-core, however with videos above 1080p the video and audio files are separate, I would like to make it work without having to do any processing in the backend to join the video and audio or do something directly in the client side.</p>
<p>I can make it work normally on Android/Windows, but on Apple devices (Safari) there is a crash when I play both media files at the same time.</p>
<p>Remembering that I want to play the video in specific sizes, for example, 480p, 720p and 1080p and synchronize with the audio, the customer will manually select the video quality.</p>
<p>Is there any solution for this case?</p>
<p>I tried to place the video and audio elements directly in the html and synchronizing via javascript didn't work in safari</p>
<p>I tried leaving just the video in the html and the audio using the <code>new Audio(url)</code> api, but I didn't have a good result either.</p>
<p>I hope to be able to play the two synchronized media files directly on the client</p>
 

Latest posts

Online statistics

Members online
0
Guests online
4
Total visitors
4
Top