Media entity audio currently supports only local audio files. It would be nice to also support remote audio streams. We could do that by using link fields.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | 2927099_17-interdiff.txt | 867 bytes | berdir |
| #17 | 2927099_17.patch | 32.51 KB | berdir |
| #16 | 2927099_16.patch | 32.5 KB | berdir |
| #15 | 2927099_15-interdiff.txt | 565 bytes | berdir |
| #15 | 2927099_15.patch | 25.54 KB | berdir |
Comments
Comment #2
slashrsm commentedComment #3
slashrsm commentedFixed a typo.
Comment #4
slashrsm commentedAdd schema.
Comment #5
berdirthis is a bit hard to read, unclear what $item is, maybe store $guesser in a variable so the line is a bit shorter and easier to read? inside or outside, could also be outside with a use ($mime_type_guesser).
not a big fan of _underscore functions, but this is just extracted out to avoid duplication, so fine I guess
in jw_player I used the same formatter for both, but quite possibly easier to separate here.
Especially since something like this might actually land in core as part of #2831944: Implement media source plugin for remote video via oEmbed (did not check if that's just video or also audio), so might not even be needed for 8.x-2.x?
Comment #6
berdirAh the core issue seems to focus on oembed support, which then wouldn't cover this. That said, core (8.5.x I think) got audio and video html5 formatters recently, so that *could* possibly be also extended there.
Comment #7
berdir#2927166: Allow HTML5 video/audio formatters for link fields on Media entities to discuss adding that to core.
Comment #8
slashrsm commented#5.1 - Refactored a bit.
#5.3 - Merging would require quite some refactoring of the existing formatter. Maybe something we can do for 2.x since it is still in alpha?
Comment #9
slashrsm commentedStarted porting to 2.x. Source plugin part is pretty straightforward. Formatter part needs work, but it seems that we could simply deprecate it based on #1174892: File field formatters for rich media display with <video> and <audio> HTML5 elements. and #2927166: Allow HTML5 video/audio formatters for link fields on Media entities if the latter lands in core.
1.x patch is identical to #7. Uploaded renamed file for clarity.
Comment #10
berdirThat will only get into 8.5.x I think, so unless we want to wait that long (and it won't be possible to use that patch in 8.4.x), we probably still need those formatters here, at least temporary?
Comment #11
slashrsm commentedAdded formatter to the 2.x patch.
Comment #12
berdirThis is the first iteration of a patch that only keeps support for streams, as a new audio_stream source plugin. Includes an update function that converts the existing ones either to audio_file (core) or audio_stream, including updating the view display config for audio_file.
The update function does not automatically uninstall itself, but sites may chose to do so if they only used audio files.
This will become a new 8.x-3.x branch.
Comment #13
berdirComment #14
berdirA binary patch for the removed fallback thumbnail (core has a audio.png too)
Comment #15
berdirUsing the correct test base class now.
Comment #16
berdirForgot --binary again.
Comment #17
berdirAnd fixing the test.
Comment #19
berdir