Skip to content

Commit a8c4a5d

Browse files
committed
fix: special treatment for audio players
1 parent 0fc40d9 commit a8c4a5d

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/plugins/cloudinary/models/audio-source/audio-source.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,17 @@ class AudioSource extends VideoSource {
3737
return this;
3838
}
3939

40-
({ publicId, options } = normalizeOptions(publicId, options, { tolerateMissingId: true }));
41-
42-
if (!publicId) {
40+
// For audio, we convert poster: true to waveform poster (not applet)
41+
if (publicId === true) {
4342
publicId = this.publicId();
4443
options = Object.assign({}, options, DEFAULT_POSTER_PARAMS);
44+
} else {
45+
({ publicId, options } = normalizeOptions(publicId, options, { tolerateMissingId: true }));
46+
47+
if (!publicId) {
48+
publicId = this.publicId();
49+
options = Object.assign({}, options, DEFAULT_POSTER_PARAMS);
50+
}
4551
}
4652

4753
options.cloudinaryConfig = options.cloudinaryConfig || this.cloudinaryConfig();

0 commit comments

Comments
 (0)