diff --git a/Assets/ossrs.io/Video Streaming and WebRTC Samples/Player/Scene.unity b/Assets/ossrs.io/Video Streaming and WebRTC Samples/Player/Scene.unity index 340e41c..a259e07 100644 --- a/Assets/ossrs.io/Video Streaming and WebRTC Samples/Player/Scene.unity +++ b/Assets/ossrs.io/Video Streaming and WebRTC Samples/Player/Scene.unity @@ -413,7 +413,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 00121d141058d4dcf8ab52e9a3819bbc, type: 3} m_Name: m_EditorClassIdentifier: - url: http://localhost:1985/rtc/v1/whip-play/?app=live&stream=livestream + url: http://localhost:1985/rtc/v1/whep/?app=live&stream=livestream receiveImage: {fileID: 1619817302} receiveAudio: {fileID: 1676004071} --- !u!1 &1511799723 diff --git a/Assets/ossrs.io/Video Streaming and WebRTC Samples/Player/SrsPlayer.cs b/Assets/ossrs.io/Video Streaming and WebRTC Samples/Player/SrsPlayer.cs index e1927e3..0638fad 100644 --- a/Assets/ossrs.io/Video Streaming and WebRTC Samples/Player/SrsPlayer.cs +++ b/Assets/ossrs.io/Video Streaming and WebRTC Samples/Player/SrsPlayer.cs @@ -11,9 +11,9 @@ public class SrsPlayer : MonoBehaviour { // The WHIP stream url, to pull WebRTC stream from SRS or other media - // servers. Please note that SRS uses `/rtc/v1/whip-play/` as a WebRTC + // servers. Please note that SRS uses `/rtc/v1/whep/` as a WebRTC // player, or parameter `action=play` in query string. - public string url = "http://localhost:1985/rtc/v1/whip-play/?app=live&stream=livestream"; + public string url = "http://localhost:1985/rtc/v1/whep/?app=live&stream=livestream"; // The RAW image to render the received WebRTC video stream. Generally, it // should be in a Canvas object. Please note that we will scale the image // size according to the video stream resolution. diff --git a/README.md b/README.md index 5e7f684..ecbffda 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ SRS WebRTC Samples for Unity. Unity supports WebRTC, see [com.unity.webrtc](https://docs.unity3d.com/Packages/com.unity.webrtc@2.4/manual/index.html) or [github](https://github.com/Unity-Technologies/com.unity.webrtc). However, the demos only work in P2P mode, not with remote SFU or SRS. -To work with SFU or WebRTC server, the best practice is to use [WHIP](https://datatracker.ietf.org/doc/draft-ietf-wish-whip/) for Unity to publish to SFU, such as SRS. Actually, you're also able to play stream by WHIP. +To work with SFU or WebRTC server, the best practice is to use [WHIP](https://datatracker.ietf.org/doc/draft-ietf-wish-whip/) for Unity to publish to SFU, such as SRS. Actually, you're also able to play stream by [WHEP](https://datatracker.ietf.org/doc/draft-murillo-whep/). The most common use scenaio for publishing stream, is to covert video game as live streaming. However you can use OBS to capture the window and audio, but it enable you to capture from Unity inside, cool! It works like this: @@ -160,7 +160,7 @@ Please follow [Setting up project](#setting-up-project), then work with `Player` 1. Publish the WebRTC stream by [H5](http://localhost:8080/players/rtc_publisher.html?autostart=true). 1. From `Project` panel, open `Asserts > ossrs.io > SRS WebRTC Samples > Player`, then open the `Scene`. -1. Open Main camera object in the editor and under the SRS player script, change the ip address and stream key to your e.g. `http://localhost:1985/rtc/v1/whip-play/?app=live&stream=livestream` +1. Open Main camera object in the editor and under the SRS player script, change the ip address and stream key to your e.g. `http://localhost:1985/rtc/v1/whep/?app=live&stream=livestream` 1. Click `Edit > Play` to play Unity scene, which publish WebRTC stream to SRS. > Note: You're also able to publish a live stream and play it in Unity using WebRTC, see [WebRTC for Live Streaming](https://ossrs.io/lts/en-us/docs/v5/doc/getting-started#webrtc-for-live-streaming).