uni app video, video player development

There are three video playback solution that uses built-in video HTML5, starting from HBuilder9.1.3 new plus.video native video playback, and use Native.js.

    1. HTML5 video tag comes, you can play video format of HTML5 compliant.
      Note excluding flv, ra tripartite commercial companies canonical form.
      HTML5's video has more on the Android browser compatibility issues, there are articles users to share classic article about the use of HTML5 video note, it is strongly recommended to watch.
      http://ask.dcloud.net.cn/article/569
      precautions when using the video tag to play video on Android, be sure to turn on hardware acceleration, or only audio and no video.
      HBuilder8.8.4 previous version, on the part rom Android5 is turned off by default hardware acceleration, this time to be forced open hardware acceleration. When you create a webview style, there are a hardwareAccelerated parameter set to true.
      Detailed reference documentation for hardware-accelerated http://ask.dcloud.net.cn/article/55
      may not be automatic horizontal screen to maximize the video full-screen playback, reference http://ask.dcloud.net.cn/article/1077
      HTML5 own video, if you want to drag the progress achieved gesture, there are articles refer to the article http://ask.dcloud.net.cn/article/13263 , but limited by the performance of HTML5, unable to drag smoothly with the hands.
      iOS video playback, use uiWebview and wkWebview have different effects, wkWebview video player comes with AirPlay function can be directly connected to the TV. But note the difference wkWebview and uiWebview, see http://ask.dcloud.net.cn/article/1318

    2. Native video plus.video of
      many developers for HTML5 native video there are several unhappy:
      A) format is not supported by the rich, such as FLV
      b) after the full-screen drag gesture is not smooth, not smooth drag the progress and volume, brightness
      in when push developers to provide a live stream, 5 + engine introduces a professional video decoding library, the way it provides native video playback capability of plus.video.
      But plus.video native video playback will increase the number of package size, requires developers to balance the needs of their own.
      5 + App in the native video controls need to use js to create, reference http://www.html5plus.org/doc/zh_cn/video.html
      UNI-App in the video component, the default HTML is not the video, the default is the original video.
      Native video using its high-level attention, covering native control, use plus.nativeObj.view in the 5 + app, the use of cover-view or plus.nativeObj.view in the uni-app can be.

    3. In addition to the HTML5 video, developers can also use the system to call Native.js player to put video on Android.
      But video playback progress and so the state can not back to js layer.
      Reference http://ask.dcloud.net.cn/question/614

Guess you like

Origin www.cnblogs.com/HopeInTheDark/p/11506360.html