This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.component { | |
background: #000 url(image.png) no-repeat left top; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* KEY: "control_watch" | |
* MESSAGE: "Watch" | |
* | |
* @returns {string} | |
* @see https://webtranslateit.com/en/projects/.../locales/en..en/strings?s=control.watch | |
*/ | |
export const controlWatch = () => translate('@app.control.watch'); | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"control.cancel": "Abbrechen", | |
"date.days.full": { | |
"one": "{{count}} Tag", | |
"other": "{{count}} Tage" | |
}, | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"locale": "de-formal", | |
"i18n": { | |
"control": { | |
"cancel": { | |
"message": "Abbrechen" | |
} | |
}, | |
"date": { | |
"days": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
common: { | |
name: 'common', | |
key: 'proj...jYr', | |
wtiID: 11468, | |
depends: [], | |
}, | |
app: { | |
name: 'app', | |
key: 'proj...KfN', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (window.navigator.mediaSession?.setPositionState) { | |
window.navigator.mediaSession.setPositionState({ | |
duration: /* duration in seconds */, | |
position: /* position from 0 in seconds */, | |
playbackRate: 1, | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// to add playlist action handlers | |
if (/* has playlist */) { | |
window.navigator.mediasSession.setActionHandler('nexttrack', () => { /* your next item */ }); | |
window.navigator.mediasSession.setActionHandler('previoustrack', () => { /* your previous item */ }); | |
} | |
// to cancel playlist action handlers | |
window.navigator.mediasSession.setActionHandler('nexttrack', null); | |
window.navigator.mediasSession.setActionHandler('previoustrack', null); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// to add seek action handlers | |
if (/* can seek backward */) { | |
window.navigator.mediasSession.setActionHandler('seekbackward', () => { /* your seek backward */ }); | |
} | |
if (/* can seek forward */) { | |
window.navigator.mediasSession.setActionHandler('seekforward', () => { /* your seek forward */ }); | |
} | |
// to cancel seek action handlers | |
window.navigator.mediasSession.setActionHandler('seekbackward', null); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// to set action handlers | |
window.navigator.mediasSession.setActionHandler('play', () => { /* your play */ }); | |
window.navigator.mediasSession.setActionHandler('pause', () => { /* your pause */ }); | |
// to reset action handlers | |
window.navigator.mediasSession.setActionHandler('play', null); | |
window.navigator.mediasSession.setActionHandler('pause', null); | |
// handlers like action & pause have defaults, to cancel them you can use noop function | |
window.navigator.mediasSession.setActionHandler('play', () => {}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.navigator.mediaSession.metadata = new window.MediaMetadata({ | |
// ... | |
artwork: [ | |
{ | |
sizes: '128x128', | |
src: 'https://images.zattoo.com/9e746/128x128.jpg', | |
type: 'image/jpeg', | |
}, | |
{ | |
sizes: '256x256', |