Kaltura Contribution Integration Wizard (KCW) Integration

I am trying to integrate the KCW into one of my websites but have so far been unable to make headway. I am using this documentation http://knowledge.kaltura.com/kaltura-contributor-wizard-kcw-website-integration

I am specifically having trouble figuring out what to put in this line.
swfobject.embedSWF("http://www.kaltura.com/kcw/ui_conf_id/1000741 ", “kcw”, “680”, “360”, “9.0.0”, “expressInstall.swf”, flashVars, params);

Obviously, this needs to be changed for my environment, but I could use some guidace. Any help would be greatly appreciated.

Hello,

The first argument is the one you should change. Each Kaltura widget has a uiconf ID.
To get the one for KCW run:
mysql> select id from ui_conf where name like ‘%contrib%’\G

Then replace the URL with your service URL and 1000741 with the ID you got back from the query.

Hope that helps,

The problem is
that there is no kcw/ui_conf_id directory in my web structure. I have looked
through my apache conf files there is no alias that would match that either. I
am using the latest CE version.

My domain looks
something like emlnx-media1.domain.edu, therefore theoretically I should have
this entry

swfobject.embedSWF(“http://emlnx-media1.domain.edu/kcw/ui_conf_id/569730”,
“kcw”, “680”, “360”, “9.0.0”,
“expressInstall.swf”, flashVars, params);

But due to the explanation above, this does not work. Am I missing something?

Thank you.

Hello,

It is not a physical directory.
Just make sure you use a UIconf ID that exists and matches what you got from the DB.
Making a request to it in your browser should load a widget.

Understood. Which KalturaClient.php file am I supposed to use? There are several.

I appreciate your patience while I learn this system.

Most welcome.
Use: /opt/kaltura/web/content/clientlibs/php5/KalturaClient.php

You can see examples of using the client libs here:
/opt/kaltura/bin/create_session.php
/opt/kaltura/bin/create_partner.php
/opt/kaltura/bin/upload_test.php

Should help you get started.

This is what I have in a test file I called kcw.php located in /opt/kaltura/app/start. But this is the error I get whenever I access the file
[Mon Dec 15 08:31:39 2014] [error] [client 10.40.300.57] PHP Fatal error:  Uncaught exception ‘KalturaException’ with message ‘Error while starting session for partner [101]’ in /opt/kaltura/web/content/clientlibs/php5/KalturaClientBase.php:734\nStack trace:\n#0 /opt/kaltura/web/content/clientlibs/php5/KalturaClient.php(6301): KalturaClientBase->throwExceptionIfError(Array)\n#1 /opt/kaltura/app/start/kcw.php(22): KalturaSessionService->start(‘894ba3398c088ad…’, ‘rpelletier@domain…’, 0)\n#2 {main}\n  thrown in /opt/kaltura/web/content/clientlibs/php5/KalturaClientBase.php on line 734

The forum kept giving me issues regarding the code, let me know if you want me to send you this in some other way.

            <?php require_once("/opt/kaltura/web/content/clientlibs/php5/KalturaClient.php"); ?>                           test     <?php     //define constants     define("KALTURA_PARTNER_ID", 101);     define("KALTURA_PARTNER_SERVICE_SECRET", "my USER secret");          //define session variables     $partnerUserID          = 'rpelletier@domain.com';          //construct Kaltura objects for session initiation     $config           = new KalturaConfiguration(KALTURA_PARTNER_ID);     $client           = new KalturaClient($config);     $ks               = $client->session->start(KALTURA_PARTNER_SERVICE_SECRET, $partnerUserID, KalturaSessionType::USER);          //Prepare variables to be passed to embedded flash object.     $flashVars = array();     $flashVars["uid"]               = $partnerUserID;     $flashVars["partnerId"]         = KALTURA_PARTNER_ID;     $flashVars["ks"]                  = $ks;     $flashVars["afterAddEntry"]     = "onContributionWizardAfterAddEntry";     $flashVars["close"]       = "onContributionWizardClose";     $flashVars["showCloseButton"]   = false;     $flashVars["Permissions"]       = 1;          ?>    
        echo "test";                    

OK, I got past my last problem. Went into the API test console and constructed session creation php script. However nothing shows up except a few echo statements I put in for testing. I believe I have it setup correct in the UIConf section. Here is the screen of the Uiconf and the xml is below. The line in my file looks like this:
swfobject.embedSWF(“https://emlnx-media1.domain.edu/kcw/ui_conf_id/23448229”, “kcw”, “680”, “360”, “2.2.4”, “ContributionWizard.swf”, flashVars, params);

<kcw>
 
  <UIConfigList>
        <UIConfig>
            <target>ContributionWizard.swf</target>
             <cssUrl>/content/uiconf/kaltura/kmc/kcw/v2.1.4/styles.swf</cssUrl>
            <localeUrl>/content/uiconf/kaltura/kmc/kcw/v2.1.4/en_US_ContributionWizard_kaltura.swf</localeUrl>
        </UIConfig>
  </UIConfigList>
 
  <ImportTypesConfig>
        <taggingConfig>
            <minTitleLen>1</minTitleLen>
            <maxTitleLen>2000</maxTitleLen>
            <minTagsLen>0</minTagsLen>
             <maxTagsLen>2000</maxTagsLen>
        </taggingConfig>
  </ImportTypesConfig>
 
  <webcamParams>
    <keyFrameInterval/>
    <width/>
    <height/>
    <framerate/>
    <favorArea/>
    <bandwidth/>
    <quality/>
  </webcamParams>
 
  <limitations>
    <upload>
      <singleFileSize min="-1" max="-1"/>
      <numFiles min="-1" max="100"/>
      <totalFileSize min="-1" max="-1"/>
    </upload>
    <search>
        <numFiles min="-1" max="-1"/>
    </search>
  </limitations>
 
  <mediaTypes>
 
    <media type="video">
<provider id="upload" name="upload" code="1">
                <authMethodList>
                    <authMethod type="1"/>
                </authMethodList>
                <moduleUrl>UploadView.swf</moduleUrl>
                <fileFilters>
            <filter type="video">
                <allowedTypes>flv,asf,qt,mov,mpg,avi,wmv,mp4,3gp,f4v,m4v</allowedTypes>
                     </filter>
                </fileFilters>
        </provider>
 
        <provider id="webcam" name="webcam" code="2">
                <authMethodList>
                    <authMethod type="1"/>
                </authMethodList>
             <moduleUrl>WebcamView.swf</moduleUrl>
                <customData>
                    <serverUrl>rtmp://{HOST_NAME}/oflaDemo</serverUrl>
                </customData>
         </provider>
 
        <provider id="metacafe" name="metacafe" code="24">
             <moduleUrl>SearchView.swf</moduleUrl>
             <authMethodList>
                     <authMethod type="1"/>
                </authMethodList>
        </provider>
 
        <provider id="thissite" name="thissite" code="23" addsearch="true">
             <moduleUrl>SearchView.swf</moduleUrl>
             <authMethodList>
                     <authMethod type="1"/>
                </authMethodList>
                <tokens>
                    <token>
                         <name>extra_data</name>
                        <value>$partner_id</value>
                    </token>
                </tokens>
        </provider>
    </media>
     
    <media type="audio">
         <provider id="upload" name="upload" code="1">
             <authMethodList>
                      <authMethod type="1"/>
             </authMethodList>
                <moduleUrl>UploadView.swf</moduleUrl>
                <fileFilters>
                    <filter type="audio">
                        <allowedTypes>flv,asf,wmv,qt,mov,mpg,avi,mp3,wav</allowedTypes>
                     </filter>
             </fileFilters>
        </provider>
 
        <provider id="ccmixter" name="ccmixter" code="10">
             <moduleUrl>SearchView.swf</moduleUrl>
             <authMethodList>
                    <authMethod type="1"/>
                    <authMethod type="3"/>
                </authMethodList>
        </provider>
       
<provider id="thissite" name="thissite" code="23">
<moduleUrl>SearchView.swf</moduleUrl>
            <authMethodList>
                <authMethod type="1"/>
            </authMethodList>
         <tokens>
                <token>
                    <name>extra_data</name>
                    <value>$partner_id</value>
                 </token>
            </tokens>
 </provider>
       
    </media>
 
   <media type="image">
 
        <provider id="upload" name="upload" code="1">
         <authMethodList>
                 <authMethod type="1"/>
            </authMethodList>
         <moduleUrl>UploadView.swf</moduleUrl>
            <fileFilters>
                <filter type="image">
                    <allowedTypes>jpg,bmp,png,gif,tiff</allowedTypes>
                </filter>
            </fileFilters>
        </provider>
 
        <provider id="flickr" name="flickr" code="3">
                <moduleUrl>SearchView.swf</moduleUrl>
             <authMethodList>
                <authMethod type="1"/>
                    <authMethod type="4" searchable="false"/>
                </authMethodList>
         </provider>
 
        <provider id="nypl" name="nypl" code="11">
             <moduleUrl>SearchView.swf</moduleUrl>
             <authMethodList>
                    <authMethod type="1"/>
             </authMethodList>
        </provider>
       
         <provider id="thissite" name="thissite" code="23" addsearch="true">
             <moduleUrl>SearchView.swf</moduleUrl>
                <authMethodList>
                    <authMethod type="1"/>
             </authMethodList>
                <tokens>
                    <token>
                    <name>extra_data</name>
                    <value>$partner_id</value>
                    </token>
             </tokens>
        </provider>
    </media>
  </mediaTypes>
 
  <StartupDefaults>
    <SingleContribution>false</SingleContribution>
    <showLogoImage>false</showLogoImage>
    <NavigationProperties>
      <showCloseButton>true</showCloseButton>
      <enableIntroScreen>false</enableIntroScreen>
      <enableTagging>true</enableTagging>
    </NavigationProperties>
    <gotoScreen>
      <mediaType>video</mediaType>
      <mediaProviderName>upload</mediaProviderName>
 </gotoScreen>
  </StartupDefaults>
</kcw>

Hello,

Can you check the error log and other logs [use the kaltlog alias from the server’s shell] as well as run an HTTP sniffer [you can use your browser’s devtools]?

I increased logging verbosity and ran kaltlog. The log is showing nothing as a result of accessing the page (I do see errors from this morning and earlier) When I view the page in developer mode, I can see that I am generating a session key but nothing is showing up on the page itself.

Does calling [quote=“rpelletier, post:8, topic:1456”]
https://emlnx-media1.domain.com/kcw/ui_conf_id/569730
[/quote]

load anything?

Yes, the browser acts as if it trying to load a flash object but ends up looking like the image below, I assume because there are necessary parameters missing.

I went ahead and installed Tiki Wiki and activated the Kaltura Plugin. I then looked at the code Tiki used to embed the KCW. See the code below. When I add this to the page, I see the KCW and I am able to upload videos. I am not entirely sure why the other code is not working properly. Kaltura CE itself seems to be working.

<object style="visibility: visible;" id="kcwFlashObject" data="https://emlnx-media1.domain.edu/kcw/ui_conf_id/23448174" type="application/x-shockwave-flash" height="360" width="680"><param value="always" name="allowScriptAccess"><param value="all" name="allowNetworking"><param value="opaque" name="wmode"><param value="uid=admin&amp;partnerId=101&amp;ks=<?php echo $ks;?>=&amp;afterAddEntry=afterAddEntry_548f0f91d9705&amp;close=onContributionWizardClose&amp;showCloseButton=false&amp;Permissions=1" name="flashvars"></object>

The alternate embed method seems to be working ok, but once I am finished importing the video it is stuck on Processing infinitely. I have to close the browser window. Is this a known issue?

I would like to get this working properly.

Jess, I appreciate all of the assistance.

It turns out my browsers were blocking the swfobject. I frankly did not think to look for this because firefox did not give any obvious indication it was being blocked and I had absolutely no reason to believe this could be the case. Does anyone know why all the browsers would be blocking this content. My google searching has come up blank so far. Any assistance, as always, is appreciated.

Figured out both of my problems. First the reason why the flash object was not showing up. I was accessing the page over https, but I was calling the swfobject script via http in my header. I was banging my head against a wall for a while over a careless mistake. Forest for the trees. Hope this helps someone learn from my mistake.

Second was the fact the processing bar did not ever stop. I solved this by placing window.location.replace(“page.php”); in one of the callback scripts. Once the script was done, it redirected back to itself. Both problems solved.

Jess, you are a rock star, I appreciate your time and patience. I suppose this can be closed now.

Hello @rpelletier,

Happy to hear its working correctly.
Let me know if you have additional issues.
Also, if you feel like writing a blog post or howto about your setup please let me know. I’ll be happy to get a pull request to https://github.com/kaltura/platform-install-packages/tree/Jupiter-10.0.0/doc
And if you wish to write a blog post and publish at blog.kaltura.org, please send it to me by mail.

Thanks,