1
- [ ![ Build Status ] ( https://travis-ci.org/orizens/ngx-youtube-player.svg?branch=master )] ( https://travis-ci.org/orizens/ngx-youtube-player )
1
+
2
2
[ ![ npm version] ( https://badge.fury.io/js/ngx-youtube-player.svg )] ( https://badge.fury.io/js/ngx-youtube-player )
3
3
[ ![ npm downloads a month] ( https://img.shields.io/npm/dm/ngx-youtube-player.svg )] ( https://img.shields.io/npm/dm/ngx-youtube-player.svg )
4
4
[ ![ npm downloads a week] ( https://img.shields.io/npm/dt/ngx-youtube-player.svg )] ( https://img.shields.io/npm/dt/ngx-youtube-player.svg )
7
7
8
8
` npm i ngx-youtube-player `
9
9
10
- # Angular Youtube Player Component
10
+ # Angular Youtube Player Component (Standalone)
11
11
12
12
This is an Angular component based on [ youtube player iframe api] ( https://developers.google.com/youtube/iframe_api_reference ) .
13
13
This component came out as a result of the [ open source project Echoes Player] ( http://github.com/orizens/echoes-player ) - an alternative player for watching and listening to media from youtube.
14
14
15
- ## Breaking Change with v7
15
+ ## Breaking Change with v17
16
16
17
- | Before < v7 | After >= v7 |
17
+ | Before < v17 | After >= v17.1.0 |
18
18
| --------------------- | ---------------------------------- |
19
- | ` YoutubePlayerModule ` | ` NgxYoutubePlayerModule ` |
20
- | ` YoutubePlayerModule ` | ` NgxYoutubePlayerModule.forRoot() ` |
19
+ | ` YoutubePlayerModule.forRoot() ` | as standalone version |
21
20
22
21
## Angular Support
23
22
24
- ** Starting with version 6** , versions follow Angular's version to easily reflect compatibility.
25
-
26
- Meaning, for Angular 11, use ngx-youtube-player @ ^11.0.0
23
+ ** Starting with version 17.1.0** , ` YoutubePlayerComponent ` is a standalone component
27
24
28
25
## LICENSE
29
26
30
27
Angular Youtube Component includes 2 optional licenses:
31
28
32
- 1 . ** Free** - for open source projects - includes standard play features, released under ** MIT** license.
33
- 2 . ** Commercial (Enterprize)** - ** you must purchase a license** , includes the following features:
29
+ 1 . ** Free** - for open source projects - includes standard play features, released under ** MIT** license.
30
+ 2 . ** Commercial (Enterprize)** - ** you must purchase a license** , includes the following features:
34
31
35
32
- License types:
36
33
- app developer (\$ 200) - a license for each developer working with this component for one product only
37
34
- platform developer (\$ 550) - a license for each developer developer working with component for all products in one company
38
35
39
- To purchase a license, please contact at https://orizens.com/contact
36
+ To purchase a license, please contact at < https://orizens.com/contact >
40
37
41
38
## Installation
42
39
@@ -66,20 +63,10 @@ Currently supported attributes:
66
63
First, import the YoutubePlayerModule to your module:
67
64
68
65
``` typescript
69
- import { NgModule } from " @angular/core" ;
70
- import { BrowserModule } from " @angular/platform-browser" ;
71
- import { YoutubePlayerModule } from " ngx-youtube-player" ;
72
66
import { platformBrowserDynamic } from " @angular/platform-browser-dynamic" ;
73
67
import { AppComponent } from " ./app" ;
74
68
75
- @NgModule ({
76
- imports: [BrowserModule , YoutubePlayerModule .forRoot ()],
77
- declarations: [AppComponent ],
78
- bootstrap: [AppComponent ],
79
- })
80
- export class AppModule {}
81
-
82
- platformBrowserDynamic ().bootstrapModule (AppModule );
69
+ bootstrapApplication (AppComponent );
83
70
```
84
71
85
72
Next, use the ** youtube-player** component. A Unique Id will be created for this player's instance:
@@ -88,6 +75,7 @@ Next, use the **youtube-player** component. A Unique Id will be created for this
88
75
import { Component } from " @angular/core" ;
89
76
90
77
@Component ({
78
+ standalone: true ,
91
79
selector: " app" ,
92
80
template: `
93
81
<youtube-player
@@ -96,6 +84,7 @@ import { Component } from "@angular/core";
96
84
(change)="onStateChange($event)"
97
85
></youtube-player>
98
86
` ,
87
+ imports: [YoutubePlayerComponent ]
99
88
})
100
89
export class AppComponent {
101
90
player: YT .Player ;
@@ -111,13 +100,11 @@ export class AppComponent {
111
100
}
112
101
```
113
102
114
- ## Testing
103
+ ## Testing (DISABLED)
115
104
116
105
To start developing tdd/bdd style: ` npm run dev `
117
106
This will: compile ts files, watch for changes and start the test task. Whenever a ts file is changed, it will rerun the tests.
118
107
119
- Travis-ci is integrated
120
-
121
108
# Showcase Examples
122
109
123
110
- [ Echoes Player] ( http://orizens.github.io/echoes-player ) ([ github repo for echoes player] ( http://github.com/orizens/echoes-player ) )
0 commit comments