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

Update config.json to support mimetype video/quicktime #194

Merged
merged 1 commit into from
Feb 26, 2020

Conversation

mmattel
Copy link
Contributor

@mmattel mmattel commented Feb 14, 2020

Fixes #169 Add Support for playing Apple Quicktime (*.mov)

@mmattel
Copy link
Contributor Author

mmattel commented Feb 14, 2020

@DeepDiver1975 mind to review

@DeepDiver1975
Copy link
Member

@mmattel did you test this? Does it work?

It doesn't for me - using Chromium 79 and Chrome 80
In FF it works.

Half baked solutions are 💩

@mmattel
Copy link
Contributor Author

mmattel commented Feb 17, 2020

There is no "one fits all" solution for QT, as the implementation is dependent on browser support. You have correctly identified this in your comment. You can easily double check this with https://browserspy.dk/quicktime.php to see if your browser supports it or not. This PR is good for those browsers who have implemented this support. We lose nothing by adding it, for this reason proposing to approve.

@mmattel
Copy link
Contributor Author

mmattel commented Feb 19, 2020

@DeepDiver1975 @felixheidecke ping, would be great if it could make it into the new release...

@DeepDiver1975
Copy link
Member

@DeepDiver1975 @felixheidecke ping, would be great if it could make it into the new release...

👎 from my pov - this is a shitty user experiance

@mmattel
Copy link
Contributor Author

mmattel commented Feb 19, 2020

You know, and I have written, that QT is dependent on if its support is implemented in the browser.
There is nothing we can do to change that. A browser might get a push up by using a addon to support it. Again nothing we can do. But for all the Apple users (macOS and IOS) this PR helps, as Safari supports it. The refrenced issue is describing that. So what is the point of denying? We lose nothing by enabling this.

@mmattel
Copy link
Contributor Author

mmattel commented Feb 19, 2020

This is just a note:

A possible solution could be to identify via JS/vue if the browser is capable of playing a particular video format.

# returns true or false
# needs mimetype checking upfront if mimetype is video
#  let str = "video/quicktime"; 
#  let n = str.search("video");
#  if (n == 0) {...

let hasVideo = !!document.createElement('video').canPlayType &&
               !!document.createElement('video').canPlayType('video/quicktime');
if (hasVideo == true) { ...

Where video/quicktime is replaced by a variable containing the current mimetype.

As an idea in /src/scripts/init.js in function at line 33

@mmattel
Copy link
Contributor Author

mmattel commented Feb 22, 2020

Added code to check if a video mimetype is playable by the browser.

This leads to following (wanted) behavior:

  • If playable - register the mime, and play in browser
  • If not playable, do not register, video will be downloaded (browser standard).

Tests made with sample videos from https://file-examples.com/index.php/

For an additional test, I removed mp4 from the mime list.
After compiling, mp4 was as expected downloaded and not played.

@DeepDiver1975 pls recheck

@DeepDiver1975 DeepDiver1975 merged commit 2e06ba8 into master Feb 26, 2020
@delete-merged-branch delete-merged-branch bot deleted the mmattel-patch-1 branch February 26, 2020 09:06
@mmattel mmattel mentioned this pull request Feb 26, 2020
3 tasks
@HanaGemela HanaGemela mentioned this pull request Feb 26, 2020
31 tasks
@HanaGemela HanaGemela restored the mmattel-patch-1 branch February 27, 2020 14:27
@delete-merged-branch delete-merged-branch bot deleted the mmattel-patch-1 branch February 28, 2020 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Support for playing Apple Quicktime (*.mov)
2 participants