Skip to content

Commit

Permalink
Merge branch 'release/0.2'
Browse files Browse the repository at this point in the history
# Conflicts:
#	.gitignore
#	README.md
#	css/oiplayer.css
#	index.html
#	js/jquery.oiplayer.js
  • Loading branch information
elfuego committed Nov 3, 2019
2 parents 0495543 + 7b1c789 commit c543a28
Show file tree
Hide file tree
Showing 40 changed files with 7,675 additions and 1,445 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
*.bbprojectd
node_modules/*

node_modules/*
64 changes: 59 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
README
============
=======
========

OIPlayer is a jQuery plugin to create a HTML5 audio and video player with fallback to Java and Flash. It is originally being developed for the media platform [Open Images](http://www.openimages.eu)

Expand All @@ -15,12 +16,12 @@ You can use OIPlayer on more specific for certain sections of your web page and

You will need to include these files: jQuery library, Flowplayer jQuery plugin, OIPlayer jQuery plugin and its css stylesheet.

<script src="oiplayer/js/jquery-1.5.1.min.js" type="text/javascript"></script>
<script src="oiplayer/js/jquery-3.4.1.min.js" type="text/javascript"></script>
<script src="oiplayer/plugins/flowplayer-3.1.4.min.js" type="text/javascript"></script>
<script src="oiplayer/js/jquery.oiplayer.js" type="text/javascript"></script>
<link href="oiplayer/css/oiplayer.css" rel="stylesheet" type="text/css" />

For example the following video tag including sources of webm, ogv and h.264 files.
For example the following video tag including sources of a webm, ogv and h.264 file.

<div class="post">
<video width="512" height="288">
Expand All @@ -30,7 +31,7 @@ For example the following video tag including sources of webm, ogv and h.264 fil
</video>
</div>

Activate OIPlayer on all div's with class 'post' and include fallback with Flash and Java.
Activate OIPlayer on all div's with class 'post'.

$(document).ready(function() {
$('div.post').oiplayer(
Expand All @@ -43,8 +44,61 @@ Activate OIPlayer on all div's with class 'post' and include fallback with Flash

The above configuration covers something like 99% of all current browsers. Maybe even the ones that existed before Flash started playing video, since it can fallback to Java with the Cortado applet that plays ogg media files. You will need to change the server name property to your own server, often browsers or their plugins dislike loading files from different servers.

## Methods ##

History
You need to target media on which OIPlayer is enabled individually - with an id for example - like in this case with id #video.

<video id="video">
<source type="video/webm; codecs=vp8,vorbis" src="lovefields.webm" />
</video>

You can jump to 60 seconds in the video with id #video. The first argument is method, second is the id of the media element you're targetting and third some parameter like number of seconds or volume.

Just **start** video at 60 seconds.

$.fn.oiplayer('start', 'video', 60);

And **jump** to 60 seconds, don't start.

$.fn.oiplayer('jump', 'video', 60);

Set audio **volume** of #video to half. This works on a scale from 0 to 100.

$.fn.oiplayer('volume', 'video', 50);

Put it back at full volume.

$.fn.oiplayer('volume', 'video', 100);

Get current **position** of media in seconds.

$.fn.oiplayer('position', 'video');


## Development ##

This project can be build with Gulp. At least, less needs to be made into css, after that the css and js sources are checked and minified. Run NPM to install all needed developer dependencies listed in `package.json`.

```bash
$ npm install
```

Or use `yarn` if you prefer. To start developing and run a simultaneous watch task, run the default task:

```bash
$ gulp
```

It will do a first build and starts a watch task with BrowserSync.


### History ###

13-11-2016
Updated methods start, jump and volume. Added method position to be able track player position (time in seconds). Added new gulp tasks for minification, browsersync, jslint and reformatted code. Tested on current lastest jQuery.

28-04-2015
I merged the event-driven branch in develop. It contains several methods to control oiplayer from 'the outside', make it 'jump' to spots several seconds in a video or audio etc.

13-07-2011
I moved OIPlayer from the Open Images project in MMBase svn to this <https://github.com/elfuego/oiplayer> location in github to make it a bit easier to experiment with its code.
Binary file added css/icons/oiplayer-webfont.eot
Binary file not shown.
30 changes: 30 additions & 0 deletions css/icons/oiplayer-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added css/icons/oiplayer-webfont.ttf
Binary file not shown.
Binary file added css/icons/oiplayer-webfont.woff
Binary file not shown.
Binary file added css/icons/oiplayer-webfont.woff2
Binary file not shown.
Binary file removed css/images/bg-blackish.png
Binary file not shown.
Binary file removed css/images/bg-whitish.png
Binary file not shown.
Binary file removed css/images/close.png
Binary file not shown.
Binary file removed css/images/controls-back.png
Binary file not shown.
Binary file removed css/images/controls-forward.png
Binary file not shown.
Binary file removed css/images/controls-fullscreen.png
Binary file not shown.
Binary file removed css/images/controls-pause.png
Binary file not shown.
Binary file removed css/images/controls-play.png
Binary file not shown.
Binary file removed css/images/controls-soundoff.png
Binary file not shown.
Binary file removed css/images/controls-soundon.png
Binary file not shown.
Binary file removed css/images/preview_audio.png
Binary file not shown.
Binary file removed css/images/preview_video.png
Binary file not shown.
Binary file removed css/images/slider11-left.png
Binary file not shown.
Binary file removed css/images/slider11-long.png
Binary file not shown.
Binary file removed css/images/slider11-pos.png
Binary file not shown.
Binary file removed css/images/slider11-right.png
Binary file not shown.
Loading

0 comments on commit c543a28

Please sign in to comment.