0

I'm trying to use a video player, in Ionic 6, I tried many options, fluidplayer, flowplayer, video html5 tag, but I'm getting access denied.

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

AndroidManifest.xml

    <application ...
        android:requestLegacyExternalStorage="true">
...
    <uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

Home.page.html

<ion-content>
  <video id="video" style="width:100%;" class="ion-padding" preload="auto">
    <source src="/assets/sample5s.mp4" type="video/mp4"/>
  </video>
  
  <div
  class="flowplayer-embed-container"
  style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width:100%;">
  <iframe
    style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"
    webkitAllowFullScreen mozallowfullscreen allowfullscreen
    src="//ljsp.lwcdn.com/api/video/embed.jsp?id=3afc64ea-fe85-456c-b9d7-6d1de8350ff2&pi=cad9d975-ccae-4757-88a3-a65ebb7419f8"
    title="0" byline="0" portrait="0"
    width="640" height="360"
    frameborder="0"
    allow="autoplay">
  </iframe>
</div>
</ion-content>
danilo
  • 7,680
  • 7
  • 43
  • 46
  • The HTML5 video looks like it is a local file on the Android device while the flowplayer ons looks like it is a video hasted on the internet. Was this your intent? – Mick May 16 '23 at 09:05
  • Hello @Mick, I'm facing problems, I'm getting errors, I want to play videos using flowplayer or fluidplayer (native players) – danilo May 16 '23 at 19:40
  • Where is the video you want to play located, on the web or on the devices local storage? – Mick May 17 '23 at 06:25
  • local, in the assets folder of ionic. Ionic is a hybrid platform, it runs over an Activity in Android, inside a Browser view, an Ionic app installs using apk, it runs a local server in the device, in Ionic we work using angular, it seems a native app, but it is local web page. – danilo May 17 '23 at 16:21
  • I think the Flowplayer embedded iframe might be a bit of a distraction above. There does seem to be issues with Ionic and HTML5 video on Android. In your case, focusing on the HTML5 rather than Flowplayer, I would experiment with the file path which I'm not sure if correct above and look at the console logs closely. There is some good info, albeit Iconic 4, here: https://devdactic.com/ionic-4-media-files-guide – Mick May 18 '23 at 11:08
  • Thanks Mick, I solved the HTML5 video tag issue, I forgot the controls attribute, but flowplayer still has problems – danilo May 18 '23 at 15:54

0 Answers0