Example of player integrating for Vue.js

Example of a simple Vue3 application that creates a player in the player container


  <div id="player"></div>

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',

#player {
   width: 100%;


export default new Promise((res) => {
   const script = document.createElement('script');
   script.onload = () => res();

You need to change the selected links to your own.

18.18.32023 © PlayerJS

Sign up free

Sign up
By signing up, you agree to Terms of Service
Login if you have an account

Restore password

Forgot email? Contact us