- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
您好,请问有实现P2P远程视频播放的样例吗?
Signaling server采用了PeerServer-Release-4.2.1,通过node peerserver.js命令已经运行起来。
但有在Peer A和Peer B上运行的样例代码吗? 谢谢!
- Tags:
- HTML5
- JavaScript*
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i do it ok and run success ,please add me email :1213126651@qq.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please look at the source code from CS_WebRTC_Client_SDK_JavaScript.v4.3\samples\p2p.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Chunbo H. (Intel) wrote:Please look at the source code from CS_WebRTC_Client_SDK_JavaScript.v4.3\samples\p2p.
The source code in the p2p example can capture stream from webcam in the local machine.
It uses MediaStreamFactory.createMediaStream() to create a video stream( call getDisplayMedia() for srceen and getUserMedia() for webcam).
I want to capture stream from a IPcamera which provides RTSP or RTMP stream, not webcam or screen。
How can I capture the stream from a RTMP url? For example : rtmp://127.0.0.1/live/ (It can played in VLC player)
Below is my code:
<video width="640px" height="480px" id="localVideo" controls playsinline muted>
<source src="rtmp://127.0.0.1/live/" type="rtmp/flv">
<!-- source src="rtmp://media3.sinovision.net:1935/live/livestream" type="rtmp/flv" -->
</video>
... ...
var video_element = document.getElementById("localVideo");
mediaStream = video_element.captureStream();
video_element.play();
When I run the code, an error prompted : "Error: All tracks are ended."
Can you tell me what is wrong with the code above? Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When the <video> source is a mp4 file, such as :<source src="js/array.mp4" type="video/mp4">, the video_element.captureStream() works OK. Mp4 stream can be transported to the remote peer and played OK.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The source code I used has change from v4.2.1 to v4.3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did this local video element with RTMP play as expected?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, it can be played with VLC player, or played with video.js inside the webpage:
var vsplayer = videojs("localVideo");
vsplayer.play();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want :
Peer B capture RTMP stream and publish to Peer A.
Peer B can play the locally with videojs, but can not publish to Peer A. It prompted : "Error: All tracks are ended."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Chunbo H. (Intel) wrote:Did this local video element with RTMP play as expected?
Can you tell me your email? I can send the complete code to you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
According to the feedback from our feature owner, we don’t support RTSP/RTMP at client side currently.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page