@quasar/quasar-ui-qmediaplayer
QMediaPlayer is an HTML5 audio/video Component and App extension for Quasar
Last updated 4 months ago by hawkeye64 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @quasar/quasar-ui-qmediaplayer 
SYNC missed versions from official npm registry.

QMediaPlayer

npm npm

QMediaPlayer is a Quasar component. It allows you to embed HTML5 video and audio into your Quasar application.

QMediaPlayer

Examples and Documentation

Can be found here

Usage

Quasar CLI project

Install the App Extension.

OR:

Create and register a boot file:

import Vue from 'vue'
import Plugin from '@quasar/quasar-ui-qmediaplayer'
import '@quasar/quasar-ui-qmediaplayer/dist/index.css'

Vue.use(Plugin)

OR:

<style src="@quasar/quasar-ui-qmediaplayer/dist/index.css"></style>

<script>
import { QMediaPlayer } from '@quasar/quasar-ui-qmediaplayer'

export default {
  components: {
    QMediaPlayer
  }
}
</script>

Vue CLI project

import Vue from 'vue'
import Plugin from '@quasar/quasar-ui-qmediaplayer'
import '@quasar/quasar-ui-qmediaplayer/dist/index.css'

Vue.use(Plugin)

OR:

<style src="@quasar/quasar-ui-qmediaplayer/dist/index.css"></style>

<script>
import { QMediaPlayer } from '@quasar/quasar-ui-qmediaplayer'

export default {
  components: {
    QMediaPlayer
  }
}
</script>

UMD variant

Exports window.QMediaPlayer.

Add the following tag(s) after the Quasar ones:

<head>
  <!-- AFTER the Quasar stylesheet tags: -->
  <link href="https://cdn.jsdelivr.net/npm/@quasar/quasar-ui-qmediaplayer/dist/index.min.css" rel="stylesheet" type="text/css">
</head>
<body>
  <!-- at end of body, AFTER Quasar script(s): -->
  <script src="https://cdn.jsdelivr.net/npm/@quasar/quasar-ui-qmediaplayer/dist/index.umd.min.js"></script>
</body>

If you need the RTL variant of the CSS, then go for the following (instead of the above stylesheet link):

<link href="https://cdn.jsdelivr.net/npm/@quasar/quasar-ui-qmediaplayer/dist/index.rtl.min.css" rel="stylesheet" type="text/css">

UMD Example

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="format-detection" content="telephone=no">
    <meta name="msapplication-tap-highlight" content="no">
    <meta name="viewport" content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width">

    <title>UMD test</title>
    <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons" rel="stylesheet" type="text/css">
    <link href="https://cdn.jsdelivr.net/npm/quasar@^1.0.0/dist/quasar.min.css" rel="stylesheet" type="text/css">
    <link href="dist/index.css" rel="stylesheet" type="text/css">
  </head>
  <body>
    <div id="q-app">
      <q-layout view="lHh Lpr fff">
        <q-header class="glossy bg-primary">
          <q-toolbar>
            <q-toolbar-title>
              quasar-ui-qmediaplayer v{{ version }}
            </q-toolbar-title>

            <div>Quasar v{{ $q.version }}</div>
          </q-toolbar>
        </q-header>

        <q-page-container>
          <q-page padding>
            <q-media-player
              type="video"
              :sources="sources"
            ></q-media-player>
            <ul class="q-mb-lg">
              <li>In /ui, run: "yarn build"</li>
              <li class="text-red">You need to build & refresh page on each change manually.</li>
              <li>Use self-closing tags only!</li>
              <li>Example: &lt;my-component&gt;&lt;/my-component&gt;</li>
            </ul>
          </q-page>
        </q-page-container>
      </q-layout>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/quasar@^1.0.0/dist/quasar.ie.polyfills.umd.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vue@^2.0.0/dist/vue.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/quasar@^1.0.0/dist/quasar.umd.min.js"></script>
    <script src="dist/index.umd.js"></script>
    <script src="dist/lang/en-us.umd.js"></script>
    <script src="dist/icon-set/material-icons.umd.js"></script>

    <script>
      new Vue({
        el: '#q-app',

        data: function () {
          return {
            version: QMediaPlayer.version,
            sources: [
              {
                src: 'http://www.peach.themazzone.com/durian/movies/sintel-2048-surround.mp4',
                type: 'video/mp4'
              }
            ]
          }
        }
      })
    </script>
  </body>
</html>

UMD example on Codepen

Building the Projects

Setup

In both the ui and ui/dev folders:

$ yarn

Developing

In the ui folder

# start dev in SPA mode
$ yarn dev

# start dev in UMD mode
$ yarn dev:umd

# start dev in SSR mode
$ yarn dev:ssr

# start dev in Cordova iOS mode
$ yarn dev:ios

# start dev in Cordova Android mode
$ yarn dev:android

# start dev in Electron mode
$ yarn dev:electron

Building package

$ yarn build

# build just the JSON API
$ yarn build:api

Donate

If you appreciate the work that went into this, please consider donating to Quasar or Jeff.

License

MIT (c) Jeff Galbraith jeff@quasar.dev

Current Tags

  • 1.0.28                                ...           latest (a month ago)

17 Versions

  • 1.0.28                                ...           a month ago
  • 1.0.27                                ...           2 months ago
  • 1.0.26                                ...           2 months ago
  • 1.0.25                                ...           3 months ago
  • 1.0.24                                ...           4 months ago
  • 1.0.23                                ...           4 months ago
  • 1.0.22                                ...           4 months ago
  • 1.0.21                                ...           6 months ago
  • 1.0.20                                ...           6 months ago
  • 1.0.19                                ...           6 months ago
  • 1.0.18                                ...           6 months ago
  • 1.0.17                                ...           9 months ago
  • 1.0.16                                ...           9 months ago
  • 1.0.3                                ...           10 months ago
  • 1.0.1                                ...           10 months ago
  • 1.0.14                                ...           10 months ago
  • 1.0.0                                ...           10 months ago
Downloads
Today 0
This Week 22
This Month 94
Last Day 5
Last Week 25
Last Month 113
Dependencies (1)
Dev Dependencies (26)

Copyright 2014 - 2016 © taobao.org |