Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Known Issues

peter-majeed edited this page Jan 8, 2013 · 2 revisions

#Known Issues There are known issues with the BrightcoveOS .NET-MAPI-Wrapper. Some of these are due to certain behaviors of Brightcove's REST API, and others are left by design, intended to be addressed in a future release.

##Issues relating to Brightcove's REST API behavior

##Issues relating to the .NET-MAPI-Wrapper implementation

##`BrightcovePlaylist`: Converting from a smart playlist to a manual/explicit playlist There is currently no documented way to convert an existing smart playlist to a manual playlist. Attempting to simply send a POST request with the `PlaylistType` changed to `Explicit` while including the `VideoIds` property results in the following error:
{"error": {"name":"UnknownServerError","message":"an unknown error occurred while processing your request ","code":100}, "result": null, "id": null}

There are two known workarounds for this behavior:

  1. Drop and recreate the playlist as an explicit playlist with the correct VideoIds populated. The downside to this approach is that the original playlist would be removed from all referencing players.
private void DropAndRecreatePlaylist()
{
    BrightcoveApi api = BrightcoveApiFactory.CreateApi("my API read token", "my API write token");

    // 2080951888001 is the Id of a smart playlist.
    BrightcovePlaylist playlist = api.FindPlaylistById(2080951888001);
            
    // Delete the playlist.
    api.DeletePlaylist(playlist.Id, true);

    // Create a new playlist using the fields returned in the
    // FindPlaylistById call.
    // The FilterTags and TagInclusionRule properties should not be included
    // since they are not used for explicit playlists.
    BrightcovePlaylist newPlaylist = new BrightcovePlaylist
    {
        Name = playlist.Name,
        // Make an explicit playlist.
        PlaylistType = PlaylistType.Explicit,
        ReferenceId = playlist.ReferenceId,
        ShortDescription = playlist.ShortDescription,
        // Use either the original VideoIds or a modified collection.
        VideoIds = playlist.VideoIds
    };

    // Recreate the playlist.
    long id = api.CreatePlaylist(newPlaylist);
}
  1. Update the playlist to Explicit without including VideoIds, then re-update the resultant Explicit playlist with the VideoIds of your choosing.
private void ModifyPlaylistTwice()
{
    BrightcoveApi api = BrightcoveApiFactory.CreateApi("my API read token", "my API write token");

    // 2080951888001 is the Id of a smart playlist.
    BrightcovePlaylist playlist = api.FindPlaylistById(2080951888001);

    // Create a new playlist using the fields returned in the FindPlaylistById call.
    // The FilterTags and TagInclusionRule properties should not be included
    // since they are not used for explicit playlists.
    // The VideoIds property should be left empty. If it is not empty, the property
    // will be serialized and the error will occur.
    BrightcovePlaylist newPlaylist = new BrightcovePlaylist
    {
        Id = playlist.Id,
        Name = playlist.Name,
        // Make an explicit playlist.
        PlaylistType = PlaylistType.Explicit,
        ReferenceId = playlist.ReferenceId,
        ShortDescription = playlist.ShortDescription
    };

    api.UpdatePlaylist(newPlaylist);

    // Now that the playlist is an Explicit playlist, you can set the VideoIds
    // property.
    newPlaylist.VideoIds = playlist.VideoIds;
    // Reupdate the playlist with the correct VideoIds collection.
    api.UpdatePlaylist(newPlaylist);
}
##`BrightcovePlaylist`: Converting from a manual/explicit playlist to a smart playlist Ordinarily, the Brightcove API throws an exception if you try to update a playlist to a smart playlist while also serializing the `VideoIds` property. This is an undocumented behavior, and there are two forum posts on this behavior on Brightcove.

The .NET-MAPI-Wrapper addresses this by first checking the PlaylistType of a playlist. If it is Explicit, it serializes VideoIds; otherwise, it ignores it.

##`BrightcovePlaylist`: The `TagInclusionRule` property is not accessible via Read API methods The `TagInclusionRule` property is not available in Read API methods per the [documentation](http://support.brightcove.com/en/video-cloud/docs/media-api-objects-reference#Playlist) (see the description of the `tagInclusionRule` property).

However, an undocumented behavior is that this property value is returned as a property value of the returned playlist of the UpdatePlaylist method. This is the only way you can determine what the value of TagInclusionRule is for any playlist that is retrieved from Brightcove's data store.

##`BrightcovePlaylist`: The default value of `TagInclusionRule` The default value of `TagInclusionRule` is `Or`. This can be tested by omitting the property from a new smart playlist, updating the playlist, then examining the `TagInclusionRule` of the returned playlist.

If TagInclusionRule is omitted from any playlist in an UpdatePlaylist call, it will maintain its original value.

##`BrightcoveAudioTrack`: Undocumented behaviors There is no documentation available for the `BrightcoveAudioTrack` class. However, in practice, it functions similarly to the `BrightcoveVideo` class. See the source for integration tests and sample uses cases for `BrightcoveAudioTrack` objects. ##`BrightcoveAudioTrackPlaylist`: Undocumented behaviors There is no documentation available for the `BrightcoveAudioTrackPlaylist` class. However, in practice, it functions similarly to the `BrightcovePlaylist` class, including the behaviors documented above. See the source for integration tests and sample uses cases for `BrightcoveAudioTrackPlaylist` objects. ##`BrightcoveVideo`: Unrepresented properties There are several properties of the [Video object](http://support.brightcove.com/en/video-cloud/docs/media-api-objects-reference#Video) that Brightcove supports that are not included in the `BrightcoveVideo` class. - `AdKeys`/`adKeys` - `GeoRestricted`/`geoRestricted` - `GeoFilteredCountries`/`geoFilteredCountries` - `GeoFilterExclude`/`geoFilterExclude`

These properties will be included in a future release.

##`BrightcoveVideo`: Unrepresented properties There are several properties of the [Video object](http://support.brightcove.com/en/video-cloud/docs/media-api-objects-reference#Video) that Brightcove supports that are not included in the `BrightcoveVideo` class. - `AdKeys`/`adKeys` - `GeoRestricted`/`geoRestricted` - `GeoFilteredCountries`/`geoFilteredCountries` - `GeoFilterExclude`/`geoFilterExclude`

These properties will be included in a future release.

##`BrightcoveVideo`: Unrepresented methods There are several methods of the [Video object](http://docs.brightcove.com/en/media/#Video_Write) that Brightcove supports that are not included in the `BrightcoveApi` class. - `AddCaptioning`/`add_captioning` - `DeleteCaptioning`/`delete_captioning`

This is by design as the CaptionSource and Caption objects are stated to be in BETA in Brightcove's documentation. When this designation is removed, these methods will be considered for inclusion in a future release.

##Other If you notice any other issues with the .NET-MAPI-Wrapper, whether it's due to a Brightcove implementation or an internal implementation, please raise them on the [Issues](https://github.com/BrightcoveOS/.NET-MAPI-Wrapper/issues) page.
Clone this wiki locally