Open ChunMinChang opened 5 years ago
If there is another reason to make the metadata nullable, could
update metadata algorithm
add some steps to handle the null metadata?
I think it is handy to reset the UI by setting null. It would indeed be good to update https://w3c.github.io/mediasession/#update-metadata-algorithm to handle the null case. Marking as ready for PR.
The
update metadata algorithm
doesn't handle the nullMediaMetadata
value. IfMediaMetadata
can be nullable, the spec should state the null value handling in the algorithm.There are two places in the spec mentioning the null metadata. One is the definition of the empty-metadata, the other is MediaSession interface. It seems to me that the null metadata is just used to reset the platform UI to a default view. In that case, I guess the empty metadata will do the same job. If that's the only reason the metadata can be null, is it possible to use empty metadata instead? If there is another reason to make the metadata nullable, could
update metadata algorithm
add some steps to handle the null metadata?The definition of the empty-metadata
MediaSession interface