-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new APIs #48
Labels
Comments
abrahamjuliot
added
enhancement
New feature or request
Research
and removed
enhancement
New feature or request
labels
Jul 29, 2020
Closed
https://tc39.es/proposal-temporal/docs/index.html
const getTemporal = () => {
if (!('Temporal' in window)) {
return
}
try {
const inParentheses = /\[(.+)\]/
const inBrackets = /\<(.+)\>/
const { now } = Temporal
const zonedDateTimeISO = now.zonedDateTimeISO()._repr_
const timeZone = now.timeZone()._repr_
const tz1 = (
inParentheses.test(zonedDateTimeISO) ?
zonedDateTimeISO.match(inParentheses)[1] :
undefined
)
const tz2 = (
inBrackets.test(timeZone) ?
timeZone.match(inBrackets)[1] :
undefined
)
return tz1 === tz2 ? tz1 : undefined
}
catch (error) {
console.error(error)
return
}
} |
result = await navigator.mediaCapabilities.decodingInfo({
type: 'file', // or 'media-source'
audio: {
contentType : 'audio/mp4'
}
})
console.log(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: