cdpz-player-beta

1.0.1 • Public • Published

Project Code Prez - Player

Code Prez is an all-in-one solution that aims to revamp coding tutorials, by creating a new dynamic between the student and the content.

It contains two parts, a free and accessible platform for creators to create their documents on, PLUS an NPM package for them to share their amazing tutorials on their own platforms.

This repo is source code of the player.

Installation

npm install cdpz-player-beta 

Props

  • content: Code Prez generated cdpz text file
  • audio: CodePrez generated weba audio file

How to use

import React, { useEffect, useState } from "react";
import Player from "cdpz-player-beta";
import Axios from "axios"; // Import Axios or use Fetch.

function App() {
    const [content, setContent] = useState(null);

	useEffect(() => {
		const fetchData = async () => {
			Axios({path/file}).then((res) => {
				setContent(res.data);
			});
		};
		fetchData();
	}, []);

    return (
        <div className="App">
            <Player content={content} audio={path/audio}/>
        </div>
    );
}

Readme

Keywords

none

Package Sidebar

Install

npm i cdpz-player-beta

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

570 kB

Total Files

3

Last publish

Collaborators

  • homerleerh