videojs / video.js

Video.js - open source HTML5 video player
https://videojs.com
Other
37.82k stars 7.43k forks source link

Local video does not play #7557

Open Arthurferrera opened 2 years ago

Arthurferrera commented 2 years ago

Description

Briefly describe the issue. Local video does not play I have a 200mb video that’s downloaded on my device and it doesn’t play, it takes a while and it just leaves the player alone and doesn’t play (This happens on IOS) Can anyone help me?

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

  1. Download a video of 200mb
  2. Try play in ios with ionic this video downloaded

Results

Expected

I hope the player plays the video normally

Actual

Simulator Loads the video for approximately 2 minutes and plays back

Real device It takes approximately 2 minutes to charge and closes the player

Error output

No error output

Additional Information

Please include any additional information necessary here. Including the following: on android it works

versions

VideoJS Version: “video.js”: “^7.15.4"

what version of videojs does this occur with? 7.15.4

browsers

what browser are affected? IOS

OSes

what platforms (operating systems and devices) are affected? IOS

plugins

none

welcome[bot] commented 2 years ago

👋 Thanks for opening your first issue here! 👋

If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines.

mister-ben commented 2 years ago

I don't know how ionic handles downloaded files, but if it's being addressed with file:// it probably won't work.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

PrashantSPol commented 2 years ago

Any updates for this issue? It still exists.

dioramayuanito commented 2 years ago

Any updates for this issue? It still exists.

Maybe you can try this solution

https://stackoverflow.com/questions/44713990/read-video-stored-on-android-native-storage-in-my-ionic-app/57494421#57494421

PrashantSPol commented 2 years ago

thanks.

dpalou commented 5 months ago

We have the same problem. We use Ionic in our app, and Ionic WebView (which uses a custom "protocol" to load local files, in our case we call it moodleappfs).

VideoJS is trying to load a 300MB file. In Android this works fine, but in iOS it doesn't, it performs several requests to the file but all of them return 0 bytes. Has anyone been able to fix this problem?

Here are some screenshots:

Screenshot 2024-04-09 at 09 25 21 Screenshot 2024-04-09 at 09 25 13 Screenshot 2024-04-09 at 09 42 53
mister-ben commented 4 months ago

iOS is more picky than most about how media is delivered. It's not possible from javascript to modify that behaviour or the request. Not responding to range requests correctly is a common issue with regular http/s servers.