You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Audio.js 760B

123456789101112131415161718192021222324252627282930
  1. import React, { Component } from 'react';
  2. /**
  3. * The React Native component which is similar to Web's audio element and wraps
  4. * around react-native-webrtc's RTCView.
  5. */
  6. export class Audio extends Component {
  7. /**
  8. * Audio component's property types.
  9. *
  10. * @static
  11. */
  12. static propTypes = {
  13. muted: React.PropTypes.bool,
  14. stream: React.PropTypes.object
  15. };
  16. /**
  17. * Implements React's {@link Component#render()}.
  18. *
  19. * @inheritdoc
  20. * @returns {null}
  21. */
  22. render() {
  23. // TODO react-native-webrtc's RTCView doesn't do anything with the audio
  24. // MediaStream specified to it so it's easier at the time of this
  25. // writing to not render anything.
  26. return null;
  27. }
  28. }