Eyevinn / webrtc-player

WebRTC (recvonly) player
MIT License
87 stars 18 forks source link

Audio only and video only mode #59

Closed shovtyuk closed 11 months ago

shovtyuk commented 11 months ago

Added options for audio/video-only mode, and this mode supports WHEPAdapter. Added fallback to audio-only mode after attempting video-only mode in case the server returns a 406 error.

birme commented 11 months ago

A general question based on that I haven't really understood the client-initiated approach of WHEP (and I am aware that in recent revision of the standard the server-initiated approach has been removed).

In what scenarios does the client know that it should expect video-only? Or is the idea it should try and the server respond 406 if not supported? Having a server-initiated SDP exchange it could in the POST request indicate to the player that it should expect video only for example.

shovtyuk commented 11 months ago

Hello! Thanks for the constructive comments! I completely agree and have made the appropriate changes. In general, the essence of the PR is to give the user the opportunity to play only audio (or only video), regardless of what the server can provide (if it can, of course). The 406 approach is not familiar to me, I just expanded the already existing approach implemented in the code with playing only video in case 406 to a similar retry with only audio.

shovtyuk commented 11 months ago

Sure! done)

shovtyuk commented 11 months ago

Thank you!