angular-storyshare-player
TypeScript icon, indicating that this package has built-in type declarations

0.0.4Β β€’Β PublicΒ β€’Β Published

angular-storyshare-player

NPM version

Storyshare is an Angular component allowing to broadcast stories on the web πŸš€

Installation

npm

npm i --save angular-storyshare-player

Usage Example

// app.module.ts
import { PlayerVideoModule } from 'angular-storyshare-player';

@NgModule({
  imports: [
    PlayerVideoModule // add PlayerVideoModule to your imports
  ]
})
export class AppModule {}
// Type.enum.ts
export enum Type {
    Image,
    Video
}
// player.component.ts
import { Story } from 'angular-storyshare-player';
import { User } from 'angular-storyshare-player';

@Component({
  template: `
    <app-player-stories [user]="user" [stories] ="stories"></app-player-stories>
  `
})
export class PlayerComponent {
  user: User = {
    name: 'Antoine Biamouret',
    img: 'https://firebasestorage.googleapis.com/v0/b/stories-b3038.appspot.com/o/me.svg?alt=media&token=523d7e9d-40bc-4866-8637-95d5a74017a8'
  }

  stories : Story[] = 
        [
            {
              source : "https://picsum.photos/id/124/1080/1920",
              type : Type.Image,
              duration : 6000,
              progression: 0
            },
            {
              source : "https://picsum.photos/id/125/1080/1920",
              type : Type.Image,
              duration : 6000,
              progression: 0
            },
            {
              source : "https://picsum.photos/id/126/1080/1920",
              type : Type.Image,
              duration : 6000,
              progression: 0
            },
            {
              source : "https://picsum.photos/id/127/1080/1920",
              type : Type.Image,
              duration : 3000,
              progression: 0
            },
            {
              source : "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerJoyrides.mp4",
              type : Type.Video,
              duration : 6000,
              progression: 0
            },
            {
              source : "https://picsum.photos/id/128/1080/1920",
              type : Type.Image,
              duration : 3000,
              progression: 0
            },
            {
              source : "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerJoyrides.mp4",
              type : Type.Video,
              duration : 6000,
              progression: 0
            },
            {
              source : "https://picsum.photos/id/129/1080/1920",
              type : Type.Image,
              duration : 3000,
              progression: 0
            }
          ]
}

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i angular-storyshare-player

      Weekly Downloads

      1

      Version

      0.0.4

      License

      MIT

      Unpacked Size

      274 kB

      Total Files

      47

      Last publish

      Collaborators

      • lebiam