Need help with sample code

I'm using the c# api provided on this page.
Error CS0029 Cannot implicitly convert type 'Kaltura.Services.UploadTokenAddRequestBuilder' to 'Kaltura.Types.UploadToken'
and
Error CS0029 Cannot implicitly convert type 'Kaltura.Services.MediaAddContentRequestBuilder' to 'Kaltura.Types.MediaEntry'
---------------- code on page.
KalturaConfiguration config = new KalturaConfiguration(PARTNER_ID); config.ServiceUrl = SERVICE_URL; Client client = new Client(config); client.KS = client.GenerateSession(ADMIN_SECRET, USER_ID, KalturaSessionType.ADMIN, PARTNER_ID, 86400, "");
Create a new Media Entry to which we’ll attach the uploaded file:
KalturaMediaEntry mediaEntry = new KalturaMediaEntry(); mediaEntry.Name = "Media Entry Using C#"; mediaEntry.MediaType = KalturaMediaType.VIDEO; mediaEntry = client.MediaService.Add(mediaEntry);
Upload the media file:
FileStream fileStream = new FileStream("DemoVideo.flv", FileMode.Open, FileAccess.Read); KalturaUploadToken uploadToken = client.UploadTokenService.Add(); client.UploadTokenService.Upload(uploadToken.Id, fileStream);
Attach the Media Entry to the file:
KalturaUploadedFileTokenResource mediaResource = new KalturaUploadedFileTokenResource(); mediaResource.Token = uploadToken.Id; mediaEntry = client.MediaService.AddContent(mediaEntry.Id, mediaResource);
-------------
Code I've slightly modified to eliminate errors, except the last two.
Kaltura.Configuration config = new Kaltura.Configuration();
config.ServiceUrl = SERVICE_URL;
Client client = new Client(config);
client.KS = client.GenerateSession(PARTNER_ID, ADMIN_SECRET, USERID,SessionType.USER, 86400, "");
MediaEntry mediaEntry = new MediaEntry();
mediaEntry.Name = "Media Entry Using C#";
mediaEntry.MediaType = MediaType.VIDEO;
MediaService.Add(mediaEntry);
FileStream fileStream = new FileStream("DemoVideo.flv", FileMode.Open, FileAccess.Read);
UploadToken uploadToken = UploadTokenService.Add();
UploadTokenService.Upload(uploadToken.Id, fileStream);
UploadedFileTokenResource mediaResource = new UploadedFileTokenResource();
mediaResource.Token = uploadToken.Id;
mediaEntry = MediaService.AddContent(mediaEntry.Id, mediaResource);
Answers
-
Dani
Senior Director, Community
*Click on a positive reaction if my reply was helpful
0 -
No, I don't know how.
The people I work for opened up an account so I can see the media files we've uploaded, but they never told me anything in regards of how to get tech support. I was given source code, but little else.
0 -
Try here: https://support.kaltura.com/login
Also have a look at the developer forum here.
Dani
Senior Director, Community
*Click on a positive reaction if my reply was helpful
0 -
Apparently my login does not work in that area.
I'm accessing
but I can't access the support login.
Should I got to site.kaltura.com/request-portal-access
Or ?
Clicking on the developer forum link, then attempting to login results in a page
"This site can't be reached. sso.kaltura.org took too long to respond."
0 -
For support either request access or reach out to your Kaltura admin.
Developer forum seems to be having some issues so hold for now.
Dani
Senior Director, Community
*Click on a positive reaction if my reply was helpful
0 -
Developer Forum was down last week too.
I've put in a request via the web form for support access.
0 -
I'll ping the team that owns the developer forum, thx!
Dani
Senior Director, Community
*Click on a positive reaction if my reply was helpful
0 -
@RichardStarr Developer forum login is back up again. https://forum.kaltura.org/
Dani
Senior Director, Community
*Click on a positive reaction if my reply was helpful
0 -
Login page is up, but not working for me.
Still waiting on the registration request from earlier.
That might be needed?
0
Categories
This Month's Leaders
-
13 Points
jmanthony
-
10 Points
ktowne
-
10 Points
christian_davis
-
6 Points
josephsalmond
-
6 Points
rspencer
-
3 Points
nawad
-
2 Points
rburriel
-
2 Points
thomas_ellis
-
2 Points
TiffanyStull
-
2 Points
cwilshus
-
1 Point
luistsanz_eLM
-
1 Point
christopher_phillips
-
1 Point
chris_clement
-
1 Point
jmeegan
-
1 Point
kjones
-
1 Point
rayreid