Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Kaltura with multiple Accoutns #2

Open
xangadix opened this issue Apr 15, 2015 · 0 comments
Open

Using Kaltura with multiple Accoutns #2

xangadix opened this issue Apr 15, 2015 · 0 comments

Comments

@xangadix
Copy link

I had an application in which all users could have their own Kaltura Credentials. The gem is aimed at one credential set per application, but you can reconfigure it in runtime. Importantly, you need to restart the kalutra session when doing so. It took me a couple of hours to figure this out, I hope this note helps someone.

def kaltura_api
    Kaltura.configure do |config|
        config.partner_id = current_user.kaltura_partner_id 
        config.administrator_secret = current_user.kaltura_administrator_secret 
        # config.service_url = current_user.kaltura_service_url
    end

    # now restart Kaltura, or you'll keep the last known credentials
    Kaltura::Session.start

    # get an entry with the credentials of the current_user
    entry = Kaltura::MediaEntry.get( params[:id] )
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant