PHILADELPHIA — Former NBA Commissioner David Stern says the league's ban on marijuana is outdated and should be reconsidered in the next collective bargaining agreement.

"I think it's time to take a whole new look at it," Stern, 77, said in an interview Wednesday with CNBC at the SeventySix Capital Sports Innovation Conference in Philadelphia.

In a wide-ranging conversation, he also touched on China's rift with the NBA and retired star Tim Duncan's return to the court as a coach.

Stern said his feelings about marijuana have shifted with the recent surge in medical use of THC and CBD — the two main compounds in cannabis — to treat pain, anxiety and other ailments.

"In many cases in sports," Stern said, "the opioid crisis begins with players being prescribed pills for their pain, and if there is another substance, whether it be CBD or THC that eases pain, then I'm all for it."

Players are subjected to four random drug tests during the season — a rule Stern helped write before stepping down in 2014 as commissioner after three decades at the league. Players aren't tested during the offseason.

Phoenix Suns center DeAndre Ayton was suspended without pay for 25 games last month for violating the NBA and NBPA's anti-drug policy when he tested positive for a banned diuretic. Though the exact substance is not known, diuretics are sometimes used to cleanse the body of THC, the psychoactive ingredient in pot, before mandatory drug tests.

Stern, who first spoke out on rescinding the rule two years ago, recalled writing the ban. He said players pushed for the rule over concerns that teammates were smoking pot at inappropriate times.

"You don't want players drinking beer at halftime," Stern said. "And you don't want them smoking joints at halftime. But if it's a controlled usage and has a viable, legitimate use, why not?"

Stern also spoke about the political firestorm created by Houston Rockets General Manager Daryl Morey on Twitter last month when he tweeted, and then deleted, a message that supported anti-government protesters in Hong Kong.

The tweet created a rift between the NBA and China, resulting in the cancellation and suspension of games on China Central Television.

Stern praised his successor, Adam Silver, for his handling of the uproar and for the decision to not discipline Morey. Stern called the issue "an education" for the league.

"I think Adam, under extraordinary, difficult circumstances, did a good job of indicating to the Chinese that there is nothing that he's going to do about stifling speech and trampling America values, and he brought the players through it," Stern said. "It's not over yet because the NBA games are still not back on CCTV, but my guess is that they will be and that we'll go back to business as usual."

Stern said it wouldn't be smart for China to end its relationship with the NBA.

"Their fans are incredibly loyal to the NBA, and every time the NBA plays in some other continent or country, whether it be Africa where there is 1.2 billion people or India where there are 1.4 billion people, people will say they're playing more here than we thought because the repressive Chinese regime made it impossible for them to play there. I don't think the Chinese government will get itself into that."

Stern said the lost revenue from canceled partnerships and broadcast deals in China will have a "marginal" impact on the NBA's salary cap, currently at $109 million per team. Some players are still concerned the cap could take a hit if the rift causes the league's basketball-related income to fall — especially since it was a team executive who caused the problem and not a player.

Stern's advice to players: "I would say they live in a great country and we developed together, with them, a great system that makes them the highest-paid athletes in the world. And there are always going to be some turns in the road but relax and enjoy it."

Sports betting is also dominating some discussions at the NBA, which just signed a partnership with DraftKings to become an authorized betting operator of the league.

"It's going to bring new fans in," Stern said, now that sports betting is legal. "Existing fans are going to stay longer. It's going to be great for franchise values, and it's going to open new sponsor categories with all the casinos who are busy fighting over it. So, I think it's good for sports."

One fan favorite, former San Antonio Spurs star Tim Duncan, returned to the court to coach this year after retiring as a player in 2016.

"I love our players to become involved in the game," Stern said. "Look around; they become our coaches, our assistant coaches, our GM's. They become owners, they will come into the G League, they'll come to the WNBA; I think it's great. There is an eco-system that I'm very proud to have been a part of and helped construct."