Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video tag does not work under dev mode in Safari #166

Closed
onevcat opened this issue Apr 20, 2018 · 2 comments
Closed

Video tag does not work under dev mode in Safari #166

onevcat opened this issue Apr 20, 2018 · 2 comments
Labels
type: enhancement Request to enhance an existing feature

Comments

@onevcat
Copy link
Contributor

onevcat commented Apr 20, 2018

Thanks for this project!

OS: macOS 10.13.4
node: 8.9.4
VuePress: 0.5.1
Browser: Safari 11.1
Local install
Yarn

What

Video tag html in a markdown file does not work under dev mode in Safari. However, it works in Chrome.

Reproduce

  1. Create a md file mixed with video HTML tag, something like thi:
## Hello

<video src="/hello.mp4" controls="controls" />
  1. Make sure there is a valid hello.mp4 file under .vuepress/public/.
  2. Run vuepress dev.
  3. Open this page in Safari.

Expected

The page should be rendered as an h2 title "Hello", followed by a video of "hello.mp4"

Result

The h2 "Hello" renders perfectly, but the video not. It turns to be a forbidden video frame:

snip20180420_1

Additional Information

  • It only happens in Dev Mode of vuepress. The dist version from vuepress build (with a simple HTTP server for the dist folder) works perfectly.
  • The rendered HTML is correct, and I could right click on the video to get the link. Copying and pasting the link to a new tab, the video does not play.
  • However, I could right click on the video to download it. Downloaded video could be played in Apple QuickTime without problem. So it seems to be the file is not served correctly?
  • Everything works well in Chrome even under Dev Mode. So I guess it might be a Safari issue which does not recognize the video format? I could switch to Chrome for dev purpose so it is just a trivial issue.

I also attached the video I am using:

http://docs.uniwebview.com/images/transition.mp4

@ulivz ulivz added the type: enhancement Request to enhance an existing feature label Apr 20, 2018
@ulivz
Copy link
Member

ulivz commented Apr 20, 2018

The issue is that safari or iOS expects chunks. which is meaning that the server should be a streaming server. If your video is from a blob or file server then safari will throw an error.

Of course, it should be an enhancement.

@ulivz
Copy link
Member

ulivz commented Jun 7, 2018

It should be fixed at #555 at 825877c, you could see it at next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Request to enhance an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants