3.0.0 • Published 2 years ago

ngx-danmaku v3.0.0

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

Ngx-Danmaku

Ngx-Danmaku is the Angular library to display flying comments on iframes element.

Installation

We recommend using @angular/cli to install,it not only makes development easier,but also allow you to take advantage of the rich ecosystem of angular packages and tooling.

$ ng new PROJECT_NAME
$ cd PROJECT_NAME
$ ng add ngx-danmaku

You can install it with npm:

$ npm install ngx-danmaku

Usage

app.module.ts

import { NgxDanmakuModule } from 'ngx-danmaku';
@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    NgxDanmakuModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

app.component.ts

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
  export class AppComponent {
  src = 'some iframe source url';
  message$ = interval(200).pipe(map((x) => 'Hello' + x)); // Observable message
}

app.component.html

<ngx-danmaku [src]="src" messagePosition="top" [newMessage]="message$ | async"></ngx-danmaku>

API

PropertyDescriptionType
srcIframe source urlstring
newMessageValue of new messagestring
stylesngStyle of iframe elementobject
messagePositionPosition of message"top" | "middle" | "bottom"
visibleWhether show Danmaku messageboolean
3.0.0

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.0.0

2 years ago

0.0.1

2 years ago

0.0.0-watch

2 years ago