Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SangwonOh committed Aug 2, 2021
2 parents 615aaf1 + 29776b9 commit 1abf29f
Show file tree
Hide file tree
Showing 14 changed files with 110 additions and 152 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
open_collective: ovenmediaengine
174 changes: 59 additions & 115 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,115 +1,59 @@
# Contributing

The OvenPlayer project is open to everyone. We are very grateful for your contribution to the OvenPlayer.

## What you can contribute

- Bug reports
- Feature requests
- Improving documentation
- Writing code

And any other contributions that make our project better!

## First step

All contributions start with the Issue. Please join the Issue if it is an unresolved Issue or create an Issue if it does not already exist. We will contact you to find the best solution without getting lost. We hope all conversations are done through the Issue for history purposes.

### Bug reports

Please make sure you have tested with the latest stable version. It is helpful to give as much detail as possible to the reproduction path when registering an Issue.

### Feature requests

Suggest new features that you and others would find useful. When you register it as an Issue, please provide a description of the function, why it is needed, and how it should work. We will organize these features and provide milestones and implement them in the near future.

### Improving documentation and Writing code

We are still discussing the commit guidelines, style guides, testing methods, and Pull request processes. It is similar to the way many other projects use it. However, if you want to contribute immediately, please create it as an Issue or mail to rock@airensoft.com or underdog@airensoft.com. Please don't worry! We're here to help you.

## How to code

This section describes the setup, development, and build process.

### Environment

OvenPlayer uses npm and webpack when building. If you are new to npm, please refer to [Install Node.js, npm, stay up-to-date](https://www.npmjs.com/get-npm) and configure your environment to make it work.

If npm works well, run the following command on the terminal to install the packages needed to develop OvenPlayer, such as webpack.

```bash
npm install -D
```

### Build

If you modify the source code, you have to build it manually.

> If you are cloning a project for the first time, you can find already built files in the `dist/development` and `dist/production` directories.
You can build your modified source code with the following command. The built source code can be found in the `dist/development/ovenplayer` directory.

```bash
npm run watch
```
This command will allow webpack to automatically build each time the source code is modified.


### Directory structure

Here is a list of important directory structures for OvenPlayer

```bash
├── dist
│ ├── development
│ └── production
├── docs
├── node_modules
├── src
│ ├── assets
│ ├── css
│ └── js
│ ├── api
│ ├── utils
│ ├── view
│ ├── ovenplayer.js
│ └── ovenplayer.skd.js
├── .gitignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── package-lock.json
├── package.json
├── README.md
├── webpack.config.development.js
└── webpack.config.production.js
```
An overview of what each of these do:

|Path|Description
| --- | --- |
|`dist/development`|Files built during development can be found in this directory.|
|`dist/production`|This is the directory that contains the files provided to end users using OvenPlayer. You do not need to worry about the development process.|
|`docs`|The directory that document files exist.|
|`node_modules`|This is the directory where the packages are installed using npm.|
|`src`|The directory where the source code exists.|
|`src/assets`|Images and fonts.|
|`src/css`|This is the directory where the css file used by View is located.|
|`src/js`|This is the directory where the JavaScript files are located.|
|`src/js/api`|Contains SDK source code.|
|`src/js/utils`|Contains Third party libraries.|
|`src/js/view`|Contains VIEW source code.|
|`src/js/ovenplayer.js`|The webpack entry file containing the View.|
|`src/js/ovenplayer.sdk.js`|The webpack entry file of SDK section.|
|`package.json`|The npm file|
|`webpack.config.developments.js`|Webpack configuration file for development environment.|
|`webpack.config.production.js`|Webpack configuration file for production.|

## Further Readings

Describes the know-how we have accumulated in implementing OvenPlayer and the concept of each module.

- What is a provider and how to add a new provider
- How to add a new UI

> We will update this section little by little.
# Contribute
First of all, thank you for your interest in OvenMediaEngine and OvenPlayer!
We need your help to keep and develop our open-source projects, and we want to tell you that you can contribute in many ways.

Thank you!

## How to contribute
- [Finding Bugs](#finding-bugs)
- [Reviewing Code](#reviewing-code)
- [Sharing Ideas](#sharing-ideas)
- [Testing](#testing)
- [Improving Documentation](#improving-documentation)
- [Spreading & Use Cases](#spreading--use-cases)
- [Recurring Donations](#recurring-donations)

And all other contributions that make our project better!

## Communication
The first communication channel we use is GitHub Issues. If you have any problem or question using OvenMediaEngine and OvenPlayer, please describe it on AirenSoft GitHub Issues. Our open-source community is lively, so developers who see your inquiry will respond as soon as possible.
Also, if your question helped someone who uses our open-source community, we think it's a great contribution.

---
### Finding Bugs
If you find any bugs while using OvenMediaEngine and OvenPlayer, please feel free to let us know through GitHub Issues. Also, we may ask you for help in reproducing it and testing the fixed code. We will do our best to reproduce and fix the bug.

### Reviewing Code
We review our code countless times before release, but we can make mistakes. So let us know if you find it. Also, if you know any code or structure that OvenMediaEngine and OvenPlayer can work on more efficiently, please let us know.

### Sharing Ideas
If you have any ideas about technology trends that can advance OvenMediaEngine and OvenPlayer and features that will work synergistically, please request us. We are ready to review and embrace it for development.

### Testing
After the OvenMediaEngine and OvenPlayer updates, we may request you to test as we have responsibility for ensuring stability in more environments. Therefore, we would be very grateful if you could help us run the test.
- [For OvenMediaEngine](https://github.com/AirenSoft/OvenMediaEngine/issues)
- [For OvenPlayer](https://github.com/AirenSoft/OvenPlayer/issues)

---
### Improving Documentation
We are not a perfectly English-speaking team. Therefore, there may be typos, grammatical awkwardness, or incomprehensible sentences in our documents. Please let us know if you find them.
Or, if you would like to translate our documents into a language other than English, we welcome your work!
- [OvenMediaEngine GitBook](https://airensoft.gitbook.io/ovenmediaengine/)
- [OvenPlayer GitBook](https://airensoft.gitbook.io/ovenplayer/)

---
### Spreading & Use Cases
If you like our open-source project, if you have made something with our open-source, or if our open-source has helped you, please let people know about OvenMediaEngine and OvenPlayer.
And we are love to hear about your experience and story using OvenMediaEngine and OvenPlayer, like why you chose this, how to use this, and more. You know, the voices of real contributors are of great help to our project.
- <contact@airensoft.com>

---
### Recurring Donations
If you want to help us continue developing OvenMediaEngine and OvenPlayer, or if our open-source has helped your business, please support us through the Open Collective.
Your financial contribution to OvenMediaEngine and OvenPlayer will be used to reward the developer's efforts, cover the cost of servers and hardware that are continuously used, and attend related exhibitions. And these are transparent, publicly visible, and is used to develop our open-source projects.
- [Open Collective](https://opencollective.com/ovenmediaengine)

---
We always hope that OvenPlayer will be of great help to your project!

Thank you!
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@ In short, OvenPlayer is <b>Open-Source HTML5 Player</b>.

OvenPlayer supports WebRTC Signaling from OvenMediaEngine for Sub-Second Latency Streaming. And, it automatically plays and fallbacks using <b>WebRTC</b>, <b>Low Latency MPEG-DASH</b> (LLDASH), <b>MPEG-DASH</b>, <b>HLS</b>, and <b>RTMP</b>.

See the picture below.
See the picture below:
<img src="docs/assets/images/01_OvenPlayer_210512.png" style="max-width: 100%; height: auto;">

We also provide [OvenMediaEngine](https://github.com/AirenSoft/OvenMediaEngine), Open-Source Sub-Second Latency Streaming Server.


## What is the goal of this project?

AirenSoft's goal is to make it easier for you to build a stable broadcasting/streaming service with Sub-Second Latency.
AirenSoft aims to make it easier for you to build a stable broadcasting/streaming service with Sub-Second Latency.
Therefore, we will continue developing and providing the most optimized tools for smooth Sub-Second Latency Streaming.

Please click on each link below for details.
Would you mind clicking on each link below for details:
* ["Live Streaming Encoder for Mobile" <b>OvenLiveKit SDK](https://www.airensoft.com/olk)</b>
* ["Sub-Second Latency Streaming Server" <b>OvenMediaEngine](https://www.ovenmediaengine.com/ome)</b>
* ["HTML5 Player" <b>OvenPlayer](https://www.ovenmediaengine.com/ovenplayer)</b>


## Features

* HTML5 Standard Player
* HTML5 Standard Player
* Streaming Playback with Various Protocols
* Sub-Second Latency: WebRTC (Signalling Protocol Conforms to the OME Specification)
* Low Latency: MPEG-DASH (Chunked CMAF)
Expand All @@ -51,12 +51,19 @@ Start the [Demo](https://airensoft.github.io/OvenPlayer/docs/demo.html) and see

## How to contribute

Please read our [Guidelines](CONTRIBUTING.md) and [Rules](CODE_OF_CONDUCT.md).
We appreciate your interest in OvenPlayer.

And we are love to hear about your <b>Experience</b> and <b>Story</b> using OvenPlayer. If you are interested, please email us at [contact@airensoft.com](mailto:contact@airensoft.com) to share <u>Why you chose OvenPlayer</u>, <u>How to use it</u>, and more.
We need your help to keep and develop our open-source project, and we want to tell you that you can contribute in many ways. Please read our [Guidelines](CONTRIBUTING.md), [Rules](CODE_OF_CONDUCT.md), and [Contribute](https://www.ovenmediaengine.com/contribute).

The voices of real contributors are of great help to our project. We always hope that OvenPlayer will make your project a success.
- [Finding Bugs](https://github.com/AirenSoft/OvenPlayer/blob/master/CONTRIBUTING.md#finding-bugs)
- [Reviewing Code](https://github.com/AirenSoft/OvenPlayer/blob/master/CONTRIBUTING.md#reviewing-code)
- [Sharing Ideas](https://github.com/AirenSoft/OvenPlayer/blob/master/CONTRIBUTING.md#sharing-ideas)
- [Testing](https://github.com/AirenSoft/OvenPlayer/blob/master/CONTRIBUTING.md#testing)
- [Improving Documentation](https://github.com/AirenSoft/OvenPlayer/blob/master/CONTRIBUTING.md#improving-documentation)
- [Spreading & Use Cases](https://github.com/AirenSoft/OvenPlayer/blob/master/CONTRIBUTING.md#spreading--use-cases)
- [Recurring Donations](https://github.com/AirenSoft/OvenPlayer/blob/master/CONTRIBUTING.md#recurring-donations)

We always hope that OvenPlayer will make your project a success.

## For more information

Expand Down
2 changes: 1 addition & 1 deletion dist/development/ovenplayer/COMMITHASH
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fc427dc9812322fb289a4a8ac05be55b57614f1e
a36cf03101172f3d9cfd588c4125800edf290243
2 changes: 1 addition & 1 deletion dist/development/ovenplayer/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fc427dc
a36cf03
31 changes: 17 additions & 14 deletions dist/development/ovenplayer/ovenplayer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/development/ovenplayer/ovenplayer.sdk.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/production/ovenplayer/COMMITHASH
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fc427dc9812322fb289a4a8ac05be55b57614f1e
a36cf03101172f3d9cfd588c4125800edf290243
2 changes: 1 addition & 1 deletion dist/production/ovenplayer/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fc427dc
a36cf03
2 changes: 1 addition & 1 deletion dist/production/ovenplayer/ovenplayer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/production/ovenplayer/ovenplayer.sdk.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/production/ovenplayer/report.html

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions src/js/view/components/controls/progressBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,6 @@ const ProgressBar = function($container, api, isAd){
drawHoverProgress(percentage);
drawTimeIndicator(percentage, event);
}
},
"mousemove document" : function(event, $current, template){

event.preventDefault();

if (mouseDown && !isMobile) {
const percentage = calculatePercentage(event);
Expand All @@ -370,7 +366,7 @@ const ProgressBar = function($container, api, isAd){
drawTimeIndicator(percentage, event);
}
},
"mouseup document" : function(event, $current, template){
"mouseup .op-progressbar" : function(event, $current, template){

event.preventDefault();

Expand Down
11 changes: 9 additions & 2 deletions src/js/view/engine/OvenTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,26 @@ const OvenTemplate = function (container, templateName, playerConfig, data, even
}
}, true);*/

let eventOption = null;

if (eventName.indexOf('touch') > -1) {
eventOption = { passive: true };
}

//sometimes target is NodeList
let nodeLength = $target.get().length;

if(nodeLength > 1){
let nodeList = $target.get();
for(let i = 0; i < nodeLength; i ++){
nodeList[i].addEventListener(eventName, wrappedFunc);
nodeList[i].addEventListener(eventName, wrappedFunc, eventOption);
}
//IE NodeList doesn't have forEach. It's wack.
//$target.get().forEach(function($item){
// $item.addEventListener(eventName, wrappedFunc);
//});
}else{
$target.get().addEventListener(eventName, wrappedFunc);
$target.get().addEventListener(eventName, wrappedFunc, eventOption);
}


Expand Down

0 comments on commit 1abf29f

Please sign in to comment.