Time limit media access like netflix and amazon do

I have a client who would like to have videos she’s “selling” viewable for only “x” amount of time.
How is this done?
I haven’t decided on a (WordPress) shopping cart – well, can it be done via any of the carts available which work with WP?
thanks, in advance for the lots more questions to come