Streaming Media

Contents

This plugin allows you to stream audio and video in a fullscreen, native player on iOS and Android.

https://github.com/nchutchind/cordova-plugin-streaming-media

联系我们?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic's experts offer official maintenance, support, and integration help.

Contact Us Today!

Ionic Streaming Media插件的安装(Installation)

ionic cordova plugin add cordova-plugin-streaming-media npm install @ionic-native/streaming-media
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More or Contact Us
ionic enterprise register --key=YOURPRODUCTKEY npm install @ionic-enterprise/streaming-media

Ionic Streaming Media插件支持的平台(Supported Platforms)

  • Amazon Fire OS
  • Android
  • iOS

Ionic Streaming Media插件的用法(Usage)

import { StreamingMedia, StreamingVideoOptions } from '@ionic-native/streaming-media/ngx';

constructor(private streamingMedia: StreamingMedia) { }

let options: StreamingVideoOptions = {
  successCallback: () => { console.log('Video played') },
  errorCallback: (e) => { console.log('Error streaming') },
  orientation: 'landscape',
  shouldAutoClose: true,
  controls: false
};

this.streamingMedia.playVideo('https://path/to/video/stream', options);