Download the PHP package sajed-zarinpour/spotplayer without Composer

On this page you can find all versions of the php package sajed-zarinpour/spotplayer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package spotplayer

spotplayer

Laravel wrapper for spotplayer.ir video service (DRM) API

This package provides an API wrapper for spotplayer.ir website. Spotplayer is a video-sharing website for teachers that provides a way to stream their video on either their website or the Spotplayer application (which is available for Windows, MacOS, Ubuntu, IOS, and Android) that ensures the copyrighting of their content. 

Installation 

Step 1:

Install the package using Composer:

composer require sajed-zarinpour/spotplayer

Step 2:

Publish the config file of the package using the following command

php artisan vendor:publish --provider="SajedZarinpour\SpotPlayer\Providers\SpotPlayerServiceProvider"

Step 3:

Set values in the

config/spotplayer.php

Usage

The package provides both Facade and helper functions. Suppose you want to call a function some_func. Following calls are equivalent:

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use SajedZarinpour\Spotplayer\Facades\SpotPlayer;

class SpotPlayerController extends Controller
{

    public function play(Request $request)
    {
       ...
       SpotPlayer::some_func();
       ...
    }
}

and

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class SpotPlayerController extends Controller
{

    public function play(Request $request)
    {
         ...
         spotplayer()->some_func();
         ...
    }
}

Note the import when using the Facade.

Basic Usage

Environement variables

SPOTPLAYER_API=YOURAPIKEY
SPOTPLAYER_MODE=test # OR production
SPOTPLAYER_DOMAIN=localhost # YOUR DOMAIN

Generating a licence

// Setting up a device
$device = spotplayer()->setDevice(
    $numberOfAllowedActiveDevices=2, 
    $Windows=0, 
    $MacOS=0, 
    $Ubuntu=0, 
    $Android=0, 
    $IOS=0, 
    $WebApp=2
);

// Generating a license
$licence = spotplayer()->licence(
    $name='John Doe', 
    $courses=['courseId1','courseId2'], 
    $watermarks='watermark text', 
    $device, 
    $payload='payload'
);

dump('licence id is:' . $licence['_id']);
dump('licence key is:' . $licence['key']);
dump('licence URL is:' . $licence['url']);

die;

[!NOTE] To generate cookie X, if you are serving on a localhost machine, make sure you run your Laravel program using:

Otherwise the cookie won't set. Moreover, make sure Laravel won't encrypt the cookie X by adding

to the $except array in Midllware/EncryptCookies.

Testing

The package is using pest for testing. Make sure that you are setting the Pest.php correctly

Moreover, open and edit the file to use one of your course data.

Run the following to run the test

Example

You can refer to laravel minimal example for a minimal example.

Docs

You can refer to documentation for further information.


All versions of spotplayer with dependencies

PHP Build Version
Package Version
Requires ext-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sajed-zarinpour/spotplayer contains the following files

Loading the files please wait ....