Skip to content

Commit

Permalink
fix(entry): remove try catch
Browse files Browse the repository at this point in the history
  • Loading branch information
ThornWalli committed Oct 10, 2023
1 parent a3b9487 commit 2ac023e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/runtime/utils/entry.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,10 @@ async function isBatteryLow() {
*
* In this case no video will be played automatically.
*/
export async function canVideoPlay(blob) {
export function canVideoPlay(blob) {
const video = document.createElement('video');
video.muted = true;
video.playsinline = true;
video.src = URL.createObjectURL(blob);

try {
await video.play();
} catch (error) {
throw new Error("Video playback not possible. Reason: can't play video");
}
return video.play();
}

0 comments on commit 2ac023e

Please sign in to comment.