mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update airplay conditions for htmlaudioplayer
This commit is contained in:
parent
070dadbc69
commit
23158a352c
1 changed files with 4 additions and 4 deletions
|
@ -502,8 +502,8 @@ class HtmlAudioPlayer {
|
||||||
setAirPlayEnabled(isEnabled) {
|
setAirPlayEnabled(isEnabled) {
|
||||||
const mediaElement = this._mediaElement;
|
const mediaElement = this._mediaElement;
|
||||||
|
|
||||||
if (document.AirPlayEnabled) {
|
if (mediaElement) {
|
||||||
if (mediaElement) {
|
if (document.AirPlayEnabled) {
|
||||||
if (isEnabled) {
|
if (isEnabled) {
|
||||||
mediaElement.requestAirPlay().catch(function(err) {
|
mediaElement.requestAirPlay().catch(function(err) {
|
||||||
console.error('Error requesting AirPlay', err);
|
console.error('Error requesting AirPlay', err);
|
||||||
|
@ -513,9 +513,9 @@ class HtmlAudioPlayer {
|
||||||
console.error('Error exiting AirPlay', err);
|
console.error('Error exiting AirPlay', err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
mediaElement.webkitShowPlaybackTargetPicker();
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
mediaElement.webkitShowPlaybackTargetPicker();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue