Coder Social home page Coder Social logo

videojs-wistia's Introduction

Video.js - Wistia Source Support

Allows you to use Wistia URL as source with Video.js.

Video.js 5 Example | Video.js 4 Example

How does it work?

Including the script vjs.wistia.js will add the Wistia as a tech. You just have to add it to your techOrder option. Wistia Javascript Player API docs.

Here is an example of how to use with Javascript events:

videojs('vid2', {
  "techOrder": ["wistia"],
  "sources": [{
    "type": "video/wistia",
    "src": "http://fast.wistia.com/embed/iframe/b0767e8ebb?version=v1&controlsVisibleOnLoad=false&playerColor=aae3d8"
  }]
}).ready(function() {
  this.on('pause', function() {
    document.body.style.backgroundColor = '#ffcccc';
    console.log("video.js - pause");
  });

  this.on('play', function() {
    document.body.style.backgroundColor = '#eafeea';
    console.log("video.js - play");
  });

  this.on('seeked', function() {
    console.log("video.js - seeked");
  });

  this.on('volumechange', function() {
    console.log("video.js - volumechange");
  });

  this.one('ended', function() {
    console.log("video.js - ended");
    this.src("https://home.wistia.com/medias/oefj398m6q?playerColor=ff0000");
    this.play();
  });
});

If you're using video.js 4 (use the video-js-4 branch) - Javascript events

videojs('videoId', {
  "techOrder": ["wistia"],
  "src": "http://fast.wistia.com/embed/iframe/b0767e8ebb"
}).ready(function() {
  this.on('pause', function() {
    console.log("video.js - pause");
  });

  this.on('play', function() {
    console.log("video.js - play");
  });

  this.on('seeked', function() {
    console.log("video.js - seeked");
  });

  this.on('volumechange', function() {
    console.log("video.js - volumechange");
  });
});

Supported URLs

http://fast.wistia.com/embed/iframe/:id

http://home.wistia.com/medias/:id

videojs-wistia's People

Contributors

dorosh avatar ryanpatrickcook avatar z4y4ts avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

videojs-wistia's Issues

Hide Wistia controls?

Is it possible to hide the native Wistia controls and use only the videojs controls?

Not working on Video.js 5.10.4

Uncaught TypeError: Cannot read property 'extend' of undefined
VIDEOJS: ERROR: The "Wistia" tech is undefined. Skipped browser support check for that tech.

VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) No compatible source was found for this media. i {code: 4, message: "No compatible source was found for this media."}code: 4message: "No compatible source was found for this media."proto: Objecte @ log.js:77h.error @ log.js:29b.error @ player.js:2244(anonymous function) @ player.js:1966e @ fn.js:35

Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause().

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.