Ejemplo n.º 1
0
 /**
  * Ooyala has to be loaded before providers which load their content onto Ooyala (aka, remote assets),
  * otherwise videos can be uploaded more than once.
  * See VID-1871 for more information.
  */
 public function testOoyalaLoadedBeforeRemoteAssets()
 {
     $providers = FeedIngesterFactory::getActiveProviders();
     $ooyalaIndex = array_search(FeedIngesterFactory::PROVIDER_OOYALA, $providers);
     $screenplayIndex = array_search(FeedIngesterFactory::PROVIDER_SCREENPLAY, $providers);
     $ivaIndex = array_search(FeedIngesterFactory::PROVIDER_IVA, $providers);
     $this->assertTrue($ooyalaIndex < $screenplayIndex, 'Ooyala should be loaded before screenplay');
     $this->assertTrue($ooyalaIndex < $ivaIndex, 'Ooyala should be loaded before iva');
 }
function loadProviders($provider)
{
    if (empty($provider)) {
        // If no provider was specified, assume all active providers
        $providersVideoFeed = FeedIngesterFactory::getActiveProviders();
    } elseif (array_search($provider, FeedIngesterFactory::getAllProviders()) !== false) {
        // If a provider was specified, check it against the list of legal providers
        $providersVideoFeed = [$provider];
    } else {
        // If a provider was given but was not found, die.
        die("unknown provider {$provider}. aborting.\n");
    }
    return $providersVideoFeed;
}