• Stars
    star
    149
  • Rank 248,619 (Top 5 %)
  • Language
    Java
  • Created about 12 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

VideoPlayer plugin for Phonegap

The video player allows you to display videos from your PhoneGap application.

This command fires an Intent to have your devices video player show the video.

Adding the Plugin to your project

Using this plugin requires Android PhoneGap.

  1. To install the plugin, move www/video to your project's www folder and include a reference to it in your html file after phonegap.js.

    <script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
    <script type="text/javascript" charset="utf-8" src="video.js"></script>

  2. Create a directory within your project called "src/com/phonegap/plugins/video" and move VideoPlayer.java into it.

  3. In your res/xml/plugins.xml file add the following line:

    <plugin name="VideoPlayer" value="com.phonegap.plugins.video.VideoPlayer"/>

Using the plugin

The plugin creates the object window.plugins.videoPlayer. To use, call the play() method:

  /**
	* Display an intent to play the video.
    *
    * @param url           The url to play
    */
  play(url)

Sample use:

window.plugins.videoPlayer.play("http://path.to.my/video.mp4");
window.plugins.videoPlayer.play("file:///path/to/my/video.mp4");
window.plugins.videoPlayer.play("file:///android_asset/www/path/to/my/video.mp4");
window.plugins.videoPlayer.play("https://www.youtube.com/watch?v=en_sVVjWFKk");

Note: When playing video from the assets folder, the video is first copied to internal storage with MODE_WORLD_READABLE.

RELEASE NOTES

October 2, 2011

  • Initial release

BUGS AND CONTRIBUTIONS

LICENSE

PhoneGap is available under either the terms of the modified BSD license or the MIT License (2008). As a recipient of PhonegGap, you may choose which license to receive this code under (except as noted in per-module LICENSE files). Some modules may not be the copyright of Nitobi. These modules contain explicit declarations of copyright in both the LICENSE files in the directories in which they reside and in the code itself. No external contributions are allowed under licenses which are fundamentally incompatible with the MIT or BSD licenses that PhoneGap is distributed under.

The text of the MIT and BSD licenses is reproduced below.


The "New" BSD License

Copyright (c) 2005-2011, Nitobi Software Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of Phonegap/Nitobi nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


The MIT License

Copyright (c) <2011> <Nitobi Software Inc., et. al., >

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.

More Repositories

1

SpeechRecognitionPlugin

W3C Web Speech API - Speech Recognition plugin for PhoneGap
Objective-C
188
star
2

SpeechSynthesisPlugin

W3C Web Speech API - Speech synthesis plugin for PhoneGap
Java
69
star
3

TelephoneNumberPlugin

Java
67
star
4

TTS

Java
27
star
5

push-workshop

PhoneGap Day US 2016 workshop - Simple mobile application built showing how to handle various push notifications
CSS
27
star
6

AppPreferences

Java
22
star
7

corinthian

Provide some common UI elements to Apache Cordova Android applications.
Java
16
star
8

js-naked-day.org

HTML
12
star
9

anna

Demo application for Speech Rec on Android
JavaScript
10
star
10

CordovaAndroidUI

HTML based UI components integrated with Apache Cordova
JavaScript
9
star
11

FtpClient

Java
9
star
12

IMEI

Java
7
star
13

Ottawa-JavaScript-PhoneGap

Slides for my presentation on June 12th
Objective-C
6
star
14

GPS-Weather

An example PhoneGap project that determines the weather at your current location.
JavaScript
5
star
15

cordova-plugin-allow-backup

To enable you to set the allowBackup property of a cordova-android application
5
star
16

SpeechShim

Shim's the webkitSpeechRecognition to W3C proposed SpeechRecognition interface
JavaScript
4
star
17

callback-blackberry

Java
4
star
18

GalleryPlugin

Add an image to the Android Gallery
Java
4
star
19

Ottawa-JavaScript-SpeechRec

My presentation on Speech Rec in the browser from January 9th, 2013
JavaScript
4
star
20

callback-qt

C++
3
star
21

tabata

Tabata Timer PWA using React
JavaScript
2
star
22

phonegap-js

JavaScript
2
star
23

Unplugg

Android application to turn off wireless, bluetooth, etc. at set times to save battery and get work done.
JavaScript
2
star
24

callback-mac

Objective-C
2
star
25

yowdev

2
star
26

callback-ios

Objective-C
2
star
27

callback-webos

JavaScript
2
star
28

callback-windows-phone

JavaScript
2
star
29

callback-docs

Ruby
1
star
30

AlgonquinMobileX4

PDF and code from my Algonquin MobileX4 presentation February 21st, 2012
JavaScript
1
star
31

submit-fallback

JavaScript
1
star
32

enhance-todomvc

CSS
1
star
33

callback-test

JavaScript
1
star
34

enhance-workshop-codemash

JavaScript
1
star
35

bookrecs-org

JavaScript
1
star
36

begin-redis-app

Begin app
JavaScript
1
star
37

Remember-Apache-Answers

Rembers the answers to Apache's Wiki CATCHPA's so you don't have to look them up
JavaScript
1
star
38

enhance-blog-template

JavaScript
1
star
39

callback-weinre

Java
1
star
40

pluginpub

JavaScript
1
star
41

summit-phonegap-supercharge

CSS
1
star
42

cordova-plugin-compat

Java
1
star
43

simple-image-server

Hapi service that returns images for a demo
JavaScript
1
star
44

callback-bada

JavaScript
1
star
45

plugins

PhoneGap plugins
1
star