open-index/open-npm huggingface dataset:
npm package: @nft-portal/portal-player
Description: Portal video player using videojs
Latest version: 0.1.10

<p align="center">
  <img src="https://user-images.githubusercontent.com/18316594/159810202-2b70920c-7fe1-4689-a1d5-e6571433395e.png" />
</p>

<p align="right">
  <i>If you use this repo, star it ✨</i>
</p>

---

<h2 align="center">Portal Video Player</h2>
<p align="center">🔐 <b>Familiar HLS Video Player using VideoJS</b></p>

---

<p align="center">
  <b>Please note that this project is under active development. APIs might change before version 1 is released.</b>
</p>

## Introduction

This video player exposes the familiar api and functionality of VideoJS while providing a simple API to work with the Portal video API.

## Getting Started:

The Portal video API hosts and serves video content from the Internet Computer blockchain. To consume this content requires a HLS capable player such as VideoJS or hls.js.

We provide a simple wrapper around the VideoJS player that lets you easily play videos hosted on your Portal channel. Simple provide the channels canister id (cid) along with the content id of the video you'd like to play.

```tsx
import { useAuthentication } from '@nft-portal/providers';
import { PortalPlayer } from '@nft-portal/portal-player';
import React from 'react';

export const VideoPage = () => {
  const { principal } = useAuthentication();
  const cid = 'your_portal_channel_cid';

  return (
    <PortalPlayer
      cid={cid} // your channels canister id
      contentId="your_video_content_id" // your video content id
      principalId={principal?.toString()} // principal id of viewer
      videoJsOptions={{ autoplay: true }} // standard videojs options
    />
  );
};
```

Use your own styling by providing a css file that overrides the standard `videojs` styling.

https://videojs.com/guides/skins/#customize-styles
npm package: @nft-portal/portal-sdk
Description: Interact with Motoko smart contracts
Latest version: 0.3.20

<p align="center">
  <img src="https://user-images.githubusercontent.com/18316594/159810202-2b70920c-7fe1-4689-a1d5-e6571433395e.png" />
</p>

<p align="right">
  <i>If you use this repo, star it ✨</i>
</p>

---

<h2 align="center">Portal SDK</h2>
<p align="center">🔐 <b>Interact with Portal protocols and canisters</b></p>

---

<p align="center">
  <b>Please note that this project is under active development. APIs might change before version 1 is released.</b>
</p>

## Introduction

This SDK exposes all the clients required to interact with Portal services.

## Getting Started

Instantiate an Actor by passing the canister id of the target service and optionally in agent.

If you don't pass an agent an anonymous one will be created. If the service requires any permissions you'll have to pass in a agent that has been authenticated.

Here's an example without using an agent to make anonymous calls:

```ts
import { PIMetadata } from '@nft-portal/portal-sdk';

const cid = 'aaaaa-aa'; // Your channel canister id

const client = PIMetadata.client(cid);

const res = await client.getMetadata();

console.log(res.ok); // prints out channel metadata
```

To make authenticated calls use the Portal providers npm package and pass the resulting agent into the client:

```ts
import { useAuthentication } from '@nft-portal/providers';
import { PILogging } from '@nft-portal/portal-sdk';

const cid = 'aaaaa-aa'; // Your channel canister id

const { agent } = useAuthentication();

const client = PILogging.client(cid, agent);

const page = {
  limit: 100n,
  cursor: {
    from: 0,
    operation: { Next: null },
  },
};

const res = await client.listLogs({ page });

console.log(res); // prints out list of logs
```