Skip to content
New issue

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

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

Already on GitHub? # to your account

[BUG] video type video/quicktime breaks compatibility with Chromium based browsers #73

Closed
mbaran5 opened this issue Jan 17, 2023 · 4 comments · Fixed by #70
Closed

[BUG] video type video/quicktime breaks compatibility with Chromium based browsers #73

mbaran5 opened this issue Jan 17, 2023 · 4 comments · Fixed by #70
Assignees
Labels
bug Something isn't working html Related to HTML Export

Comments

@mbaran5
Copy link

mbaran5 commented Jan 17, 2023

A video with the src set to

<video controls> <source src="attachments/71cba48a-707b-4dee-b494-ba43ef5c0f0c.mov" type="video/quicktime"> </video> will not play in Edge or Chrome.

image

A video with the src set to

<video controls> <source src="attachments/71cba48a-707b-4dee-b494-ba43ef5c0f0c.mov" </video> play just fine.

From a quick google, this seems to have been or is an issue https://secure.phabricator.com/T13135

@ReagentX ReagentX added bug Something isn't working html Related to HTML Export labels Jan 17, 2023
@ReagentX
Copy link
Owner

ReagentX commented Jan 17, 2023

That's pesky. Right now that mime_type is parsed from the table. Need to have better logic to handle cases like this.

/// Get the media type of an attachment
pub fn mime_type(&'_ self) -> MediaType<'_> {
match &self.mime_type {
Some(mime) => {
if let Some(mime_str) = mime.split('/').into_iter().next() {
match mime_str {
"image" => MediaType::Image(mime),
"video" => MediaType::Video(mime),
"audio" => MediaType::Audio(mime),
"text" => MediaType::Text(mime),
"application" => MediaType::Application(mime),
_ => MediaType::Other(mime),
}
} else {
MediaType::Other(mime)
}
}
None => MediaType::Unknown,
}
}

@ReagentX ReagentX self-assigned this Jan 17, 2023
@mbaran5
Copy link
Author

mbaran5 commented Jan 18, 2023

I can also confirm this workaround works as well

nextcloud/files_videoplayer#129 (comment)

I've tested this in a conversation of mine.

@ReagentX
Copy link
Owner

Really helpful, thank you for the report and the workarounds!

@mbaran5
Copy link
Author

mbaran5 commented Jan 18, 2023

No problemo! This finally lets me get something like 120GB of message content off my phone/iCloud and I can turn on discard after 1 year and still keep my history.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working html Related to HTML Export
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants