Coder Social home page Coder Social logo

dorianboulch / angular-social-video-player Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hugocapocci/angular-social-video-player

0.0 2.0 0.0 56 KB

AngularJS directive that allow to dispaly video player for youtube, dailymotion & vimeo (maybe more to come)

License: Apache License 2.0

JavaScript 10.14% CoffeeScript 89.86%

angular-social-video-player's Introduction

angular-social-video-player

AngularJS directive that allow to display video player for youtube, dailymotion & vimeo (maybe more to come)

Table of contents

About

This directive for AngularJS allow to use dynamically a webplayer for youtube, dailymotion or vimeo videos. Only specify provider and video id When a video is played, paused, finished, the directive broadcast an event

Dependencies

Installation

You can install through bower:

bower install --save angular-social-video-player

Then add the source to your project

<script src="bower_components/angular-social-video-player/dist/player.min.js" type="text/javascript"></script>

Add the module dependency in your AngularJS app

angular.module('myApp', ['socialVideoPlayer']);

Then use the directive sv-player

<div sv-player auto-play="false" height="530" width="830" pause="false" video-provider="youtube" video-id="DmFImtgjoWE"></div>

Documentation

An explanation of the properties :

height, width (required attributes)

Size of the generated iFrame

video-provider (required attribute)

can be 'youtube'/'google', 'daylimotion' or 'vimeo'

video-id (required attribute)

id of the video, not the url

auto-play (optional attribute)

if set to true, video will play automatically. Default to false

pause (optional attribute)

if set to true, current video will stop (if running). Default to false if the current video is paused and 'pause' is set to false, then the video will play

Demo

Test it on jsfiddle https://jsfiddle.net/DrHelmut/2w6mycxy/

Build

Use command npm run build to build (gulp) the project files in the dist folder

License

The MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

angular-social-video-player's People

Contributors

hugocapocci avatar

Watchers

 avatar  avatar

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.