Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

new APIs #48

Open
4 of 7 tasks
abrahamjuliot opened this issue Jul 29, 2020 · 2 comments
Open
4 of 7 tasks

new APIs #48

abrahamjuliot opened this issue Jul 29, 2020 · 2 comments
Labels

Comments

@abrahamjuliot
Copy link
Owner

abrahamjuliot commented Jul 29, 2020


@abrahamjuliot abrahamjuliot added enhancement New feature or request Research and removed enhancement New feature or request labels Jul 29, 2020
@abrahamjuliot abrahamjuliot changed the title begin testing WebGPU API test new APIs Aug 14, 2020
@abrahamjuliot
Copy link
Owner Author

abrahamjuliot commented Feb 9, 2021

https://tc39.es/proposal-temporal/docs/index.html
https://blogs.igalia.com/compilers/2020/06/23/dates-and-times-in-javascript/
https://github.com/tc39/proposal-temporal

Temporal concept

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
	}
}

@abrahamjuliot
Copy link
Owner Author

result = await navigator.mediaCapabilities.decodingInfo({
    type: 'file', // or 'media-source'
    audio: {
        contentType : 'audio/mp4'
    }
})
console.log(result)

@abrahamjuliot abrahamjuliot changed the title test new APIs new APIs Jul 26, 2021
@abrahamjuliot abrahamjuliot pinned this issue Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant