Note that ipywebrtc.webrtc
is imported in the ipywebrtc namespace, to you can access ipywebrtc.CameraStream instead of ipywebrtc.webrtc.CameraStream
.
Quick setup for a chatroom.
room (str) – Roomname, if not given, a random sequence is generated and printed.
stream (MediaStream) – The media stream to share, if not given a CameraStream will be created.
Bases: Recorder
Creates a recorder which allows to record the Audio of a MediaStream widget, play the record in the Notebook, and download it or turn it into an Audio widget.
For help on supported values for the “codecs” attribute, see https://stackoverflow.com/questions/41739837/all-mime-types-supported-by-mediarecorder-in-firefox-and-chrome
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
Subclasses can declare default classes by overriding the klass attribute
Optional codecs for the recording, e.g. “opus”.
Save the audio to a file, if no filename is given it is based on the filename trait and the format.
>>> recorder = AudioRecorder(filename='test', format='mp3') >>> ... >>> recorder.save() # will save to test.mp3 >>> recorder.save('foo') # will save to foo.mp3 >>> recorder.save('foo.dat') # will save to foo.dat
Bases: MediaStream
Represent a stream of an audio element
An ipywidgets.Audio instance that will be the source of the media stream.
Create a AudioStream from a url by downloading
url (str) – The url of the file that will be downloadeded and its bytes assigned to the value trait of the video trait.
**kwargs – Extra keyword arguments for AudioStream
Create a AudioStream from a local file.
filename (str) – The location of a file to read into the audio value from disk.
**kwargs – Extra keyword arguments for AudioStream
Create a AudioStream from a url.
This will create a AudioStream from an Audio using its url
url (str) – The url of the file that will be used for the .audio trait.
**kwargs – Extra keyword arguments for AudioStream
Plays the audiostream or pauses it.
Bases: MediaStream
Represents a media source by a camera/webcam/microphone using getUserMedia. See https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia for more detail. The constraints trait can be set to specify constraints for the camera or microphone, which is described in the documentation of getUserMedia, such as in the link above, Two convenience methods are avaiable to easily get access to the ‘front’ and ‘back’ camera, when present
>>> CameraStream.facing_user(audio=False) >>> CameraStream.facing_environment(audio=False)
//developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia for details.
Constraints for the camera, see https
Convenience method to get the camera facing the environment (often the back)
audio (bool) – Capture audio or not
**kwargs – Extra keyword arguments passed to the CameraStream
Convenience method to get the camera facing the user (often front)
audio (bool) – Capture audio or not
**kwargs – Extra keyword arguments passed to the CameraStream
Bases: Recorder
Creates a recorder which allows to grab an Image from a MediaStream widget.
The format of the image.
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
Subclasses can declare default classes by overriding the klass attribute
Save the image to a file, if no filename is given it is based on the filename trait and the format.
>>> recorder = ImageRecorder(filename='test', format='png') >>> ... >>> recorder.save() # will save to test.png >>> recorder.save('foo') # will save to foo.png >>> recorder.save('foo.dat') # will save to foo.dat
Bases: MediaStream
Represent a media stream by a static image
Create a ImageStream from a url by downloading
url (str) – The url of the file that will be downloadeded and its bytes assigned to the value trait of the video trait.
**kwargs – Extra keyword arguments for ImageStream
Create a ImageStream from a local file.
filename (str) – The location of a file to read into the value from disk.
**kwargs – Extra keyword arguments for ImageStream
Create a ImageStream from a url.
This will create a ImageStream from an Image using its url
url (str) – The url of the file that will be used for the .image trait.
**kwargs – Extra keyword arguments for ImageStream
An ipywidgets.Image instance that will be the source of the media stream.
Bases: DOMWidget
Represents a media source.
See https://developer.mozilla.org/nl/docs/Web/API/MediaStream for details In practice this can a stream coming from an HTMLVideoElement, HTMLCanvasElement (could be a WebGL canvas) or a camera/webcam/microphone using getUserMedia.
VideoStream
: A video file/data as media stream.
CameraStream
: Webcam/camera as media stream.
ImageStream
: An image as a static stream.
WidgetStream
: Arbitrary DOMWidget as stream.
VideoRecorder
: To record a movie
ImageRecorder
: To create images/snapshots.
AudioRecorder
: To record audio.
WebRTCRoom
(or rather WebRTCRoomMqtt
): To stream a media stream to a (set of) peers.
Bases: DOMWidget
If true, will save the data to a file once the recording is finished (based on filename and format)
Download the recording (usually a popup appears in the browser)
The filename used for downloading or auto saving.
The format of the recording.
(boolean) Indicator and controller of the recorder state, i.e. putting the value to True will start recording.
An instance of MediaStream
that is the source for recording.
Bases: Recorder
Creates a recorder which allows to record a MediaStream widget, play the record in the Notebook, and download it or turn it into a Video widget.
For help on supported values for the “codecs” attribute, see https://stackoverflow.com/questions/41739837/all-mime-types-supported-by-mediarecorder-in-firefox-and-chrome
Optional codecs for the recording, e.g. “vp8” or “vp9, opus”.
Save the video to a file, if no filename is given it is based on the filename trait and the format.
>>> recorder = VideoRecorder(filename='test', format='mp4') >>> ... >>> recorder.save() # will save to test.mp4 >>> recorder.save('foo') # will save to foo.mp4 >>> recorder.save('foo.dat') # will save to foo.dat
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
Subclasses can declare default classes by overriding the klass attribute
Bases: MediaStream
Represent a stream of a video element
Create a VideoStream from a url by downloading
url (str) – The url of the file that will be downloadeded and its bytes assigned to the value trait of the video trait.
**kwargs – Extra keyword arguments for VideoStream
Create a VideoStream from a local file.
filename (str) – The location of a file to read into the value from disk.
**kwargs – Extra keyword arguments for VideoStream
Create a VideoStream from a url.
This will create a VideoStream from a Video using its url
url (str) – The url of the file that will be used for the .video trait.
**kwargs – Extra keyword arguments for VideoStream
Plays the videostream or pauses it.
An ipywidgets.Video instance that will be the source of the media stream.
Bases: DOMWidget
A peer-to-peer webrtc connection
A boolean (True, False) trait.
A boolean (True, False) trait.
A trait for unicode strings.
A trait for unicode strings.
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
Subclasses can declare default classes by overriding the klass attribute
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
Subclasses can declare default classes by overriding the klass attribute
Bases: DOMWidget
A ‘chatroom’, which consists of a list of :WebRTCPeer connections
A trait for unicode strings.
An instance of a Python list.
A trait for unicode strings.
A trait for unicode strings.
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
Subclasses can declare default classes by overriding the klass attribute
An instance of a Python list.
Bases: WebRTCRoom
Bases: WebRTCRoom
Use a mqtt server to connect to other peers
A trait for unicode strings.
Bases: MediaStream
Represents a widget media source.
(int, default None) The maximum amount of frames per second to capture, or only on new data when the valeus is None.
An instance of ipywidgets.DOMWidget that will be the source of the MediaStream.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4