Vue.js Desculpe, esta página está aguardando tradução para o português Example of a simple Vue3 application that creates a player in the player container App.vue<template> <div id="player"></div> </template> <script> import { ref } from 'vue'; import pjs from './playerjsloader.js'; export default { name: 'Test', setup() { pjs.then(() => { let player = new Playerjs({ id: 'player', file: 'https://plrjs.com/sample.mp4', }); }); }, }; </script> <style> #player { width: 100%; } </style> playerjsloader.jsexport default new Promise((res) => { const script = document.createElement('script'); script.onload = () => res(); script.setAttribute( 'src', 'https://mysite.com/playerjs.js' ); document.head.appendChild(script); }); You need to change the selected links to your own. There is also an example of player integration for an old Vue 2 |